uasername commited on
Commit
f7035ff
·
verified ·
1 Parent(s): 02356c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -59,17 +59,17 @@ def lookup_definition(query: str) -> AgentText:
59
  AUDIO_OUTPUT_PATH = "/tmp/response.mp3"
60
 
61
  @tool
62
- def text_to_speech(response_text: str) -> AgentAudio:
63
  """Converts input text to speech and returns an AgentAudio instance with the audio file path.
64
 
65
  Args:
66
- query: The definition of the word.
67
-
68
  Returns:
69
- An audio response.
70
-
71
  """
72
- tts = gTTS(text=response_text, lang='en')
73
  tts.save(AUDIO_OUTPUT_PATH)
74
  return AgentAudio(AUDIO_OUTPUT_PATH)
75
 
 
59
  AUDIO_OUTPUT_PATH = "/tmp/response.mp3"
60
 
61
  @tool
62
+ def text_to_speech(text: str) -> AgentAudio:
63
  """Converts input text to speech and returns an AgentAudio instance with the audio file path.
64
 
65
  Args:
66
+ text (str): The text that will be converted into speech.
67
+
68
  Returns:
69
+ AgentAudio: An AgentAudio instance containing the file path to the generated audio.
70
+
71
  """
72
+ tts = gTTS(text=text, lang='en')
73
  tts.save(AUDIO_OUTPUT_PATH)
74
  return AgentAudio(AUDIO_OUTPUT_PATH)
75