Spaces:
Runtime error
Runtime error
Commit
·
96a8500
1
Parent(s):
f2ee9ba
give right to AI TTS
Browse files
app.py
CHANGED
@@ -277,16 +277,13 @@ def text_to_speech_2(text):
|
|
277 |
with open('sample-' + timestr + '.wav', 'wb') as audio:
|
278 |
audio.write(response.content)
|
279 |
print ("File Name ", audio.name)
|
280 |
-
print (audio)
|
281 |
Audio_output.append(audio.name)
|
|
|
282 |
except requests.exceptions.RequestException as e:
|
283 |
print(f"Error: {e}")
|
284 |
return None
|
285 |
|
286 |
-
|
287 |
-
return("test.mp3")
|
288 |
-
# return response.content
|
289 |
-
|
290 |
Text2Sound_tool = Tool(
|
291 |
name = "Text To Sound REST API",
|
292 |
# func = Text2Sound,
|
@@ -441,9 +438,9 @@ def chathmi2(message, history):
|
|
441 |
print("History: ", history)
|
442 |
response = output
|
443 |
yield response
|
444 |
-
if len(Audio_output) > 0:
|
445 |
-
|
446 |
-
|
447 |
except Exception as e:
|
448 |
print("error:", e)
|
449 |
|
|
|
277 |
with open('sample-' + timestr + '.wav', 'wb') as audio:
|
278 |
audio.write(response.content)
|
279 |
print ("File Name ", audio.name)
|
280 |
+
# print (audio)
|
281 |
Audio_output.append(audio.name)
|
282 |
+
return audio.name
|
283 |
except requests.exceptions.RequestException as e:
|
284 |
print(f"Error: {e}")
|
285 |
return None
|
286 |
|
|
|
|
|
|
|
|
|
287 |
Text2Sound_tool = Tool(
|
288 |
name = "Text To Sound REST API",
|
289 |
# func = Text2Sound,
|
|
|
438 |
print("History: ", history)
|
439 |
response = output
|
440 |
yield response
|
441 |
+
# if len(Audio_output) > 0:
|
442 |
+
# yield Audio_output
|
443 |
+
# Audio_output = []
|
444 |
except Exception as e:
|
445 |
print("error:", e)
|
446 |
|