Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -60,14 +60,13 @@ AUDIO_OUTPUT_PATH = "/tmp/response.mp3"
|
|
60 |
|
61 |
@tool
|
62 |
def text_to_speech(text: str) -> AgentAudio:
|
63 |
-
"""
|
64 |
-
|
65 |
-
Args:
|
66 |
-
text (str): The text that will be converted into speech.
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
71 |
"""
|
72 |
tts = gTTS(text=text, lang='en')
|
73 |
tts.save(AUDIO_OUTPUT_PATH)
|
|
|
60 |
|
61 |
@tool
|
62 |
def text_to_speech(text: str) -> AgentAudio:
|
63 |
+
"""
|
64 |
+
Convert text to speech and return the generated audio.
|
|
|
|
|
65 |
|
66 |
+
:param text: The text to be converted into speech.
|
67 |
+
:type text: str
|
68 |
+
:return: An AgentAudio instance containing the path to the generated audio file.
|
69 |
+
:rtype: AgentAudio
|
70 |
"""
|
71 |
tts = gTTS(text=text, lang='en')
|
72 |
tts.save(AUDIO_OUTPUT_PATH)
|