digitalhumantalk/urltest.py
2024-12-10 17:05:37 +08:00

19 lines
386 B
Python

import requests
import json
url = "http://localhost:8000/inference/tts"
payload = json.dumps({
"query": "未来式智能数字人公司",
"speaker_name": "",
"sft_name": "康辉"
})
headers = {
'accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)