Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -141,7 +141,7 @@ def compare_texts(reference_text, transcribed_text):
|
|
141 |
def text_to_speech(paragraph):
|
142 |
if not paragraph:
|
143 |
return None # Handle the case when no text is provided
|
144 |
-
|
145 |
tts = gTTS(paragraph)
|
146 |
audio_file_path = "audio/paragraph.mp3" # Save the audio to a file
|
147 |
tts.save(audio_file_path)
|
@@ -184,4 +184,3 @@ demo = gr.TabbedInterface([interface, tts_interface], ["Speech Recognition", "Te
|
|
184 |
|
185 |
# Launch Gradio app
|
186 |
demo.launch()
|
187 |
-
loadfile()
|
|
|
141 |
def text_to_speech(paragraph):
|
142 |
if not paragraph:
|
143 |
return None # Handle the case when no text is provided
|
144 |
+
loadfile()
|
145 |
tts = gTTS(paragraph)
|
146 |
audio_file_path = "audio/paragraph.mp3" # Save the audio to a file
|
147 |
tts.save(audio_file_path)
|
|
|
184 |
|
185 |
# Launch Gradio app
|
186 |
demo.launch()
|
|