This commit is contained in:
talksik
2023-04-29 10:44:48 -07:00
parent 63d04477b2
commit 9dce6de67c
+3 -1
View File
@@ -11,6 +11,8 @@ API_URL = "http://192.168.50.159:5001/tts"
audioInstance = audio.Audio()
def say(text):
# send request with json
headers = {
"Content-type": "application/json",
@@ -18,7 +20,7 @@ headers = {
response = requests.post(
API_URL,
headers=headers,
json={"text": "hello world. the weather today is sunny."}
json={"text": text}
)
# get the file data from the response and write to temp local file