|
@@ -0,0 +1,18 @@
|
|
|
+import requests
|
|
|
+import json
|
|
|
+headers = {
|
|
|
+ "Authorization": "84e1df1b61114e75b134b5ec496b8922",
|
|
|
+ "X-User-ID": "HEQLQR1WgpYtN0SEyKoWBsLiZXX2"
|
|
|
+}
|
|
|
+
|
|
|
+postdata={
|
|
|
+ "voice": "zh-TW-HsiaoChenNeural",
|
|
|
+ "content": ['集仕多股份有限公司','第二個段落','第二代AI主播測試']
|
|
|
+}
|
|
|
+#r = requests.post('https://play.ht/api/v1/./convert', headers=headers,data=json.dumps(postdata))
|
|
|
+#r = requests.post('https://play.ht/api/v1/./convert', headers=headers,json=postdata)
|
|
|
+r = requests.post('https://play.ht/api/v1/convert', headers=headers,json=postdata)
|
|
|
+
|
|
|
+print(r.status_code)
|
|
|
+print(r.json())
|
|
|
+
|