cleanup
This commit is contained in:
+3
-1
@@ -11,6 +11,8 @@ API_URL = "http://192.168.50.159:5001/tts"
|
|||||||
|
|
||||||
audioInstance = audio.Audio()
|
audioInstance = audio.Audio()
|
||||||
|
|
||||||
|
|
||||||
|
def say(text):
|
||||||
# send request with json
|
# send request with json
|
||||||
headers = {
|
headers = {
|
||||||
"Content-type": "application/json",
|
"Content-type": "application/json",
|
||||||
@@ -18,7 +20,7 @@ headers = {
|
|||||||
response = requests.post(
|
response = requests.post(
|
||||||
API_URL,
|
API_URL,
|
||||||
headers=headers,
|
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
|
# get the file data from the response and write to temp local file
|
||||||
|
|||||||
Reference in New Issue
Block a user