Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -243,7 +243,7 @@ async def text_to_speech_edge(text, language_code):
|
|
| 243 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmp_file:
|
| 244 |
tmp_path = tmp_file.name
|
| 245 |
await communicate.save(tmp_path)
|
| 246 |
-
return
|
| 247 |
|
| 248 |
input_text = gr.Textbox(lines=5, label="Input Text")
|
| 249 |
output_audio = gr.Audio(type="filepath", label="Exported Audio")
|
|
@@ -252,10 +252,9 @@ language = gr.Dropdown(choices=list(language_dict.keys()), label="Choose the Voi
|
|
| 252 |
interface = gr.Interface(
|
| 253 |
fn=text_to_speech_edge,
|
| 254 |
inputs=[input_text, language],
|
| 255 |
-
outputs=
|
| 256 |
title="",
|
| 257 |
description="",
|
| 258 |
-
|
| 259 |
)
|
| 260 |
|
| 261 |
if __name__ == "__main__":
|
|
|
|
| 243 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmp_file:
|
| 244 |
tmp_path = tmp_file.name
|
| 245 |
await communicate.save(tmp_path)
|
| 246 |
+
return tmp_path
|
| 247 |
|
| 248 |
input_text = gr.Textbox(lines=5, label="Input Text")
|
| 249 |
output_audio = gr.Audio(type="filepath", label="Exported Audio")
|
|
|
|
| 252 |
interface = gr.Interface(
|
| 253 |
fn=text_to_speech_edge,
|
| 254 |
inputs=[input_text, language],
|
| 255 |
+
outputs=output_audio,
|
| 256 |
title="",
|
| 257 |
description="",
|
|
|
|
| 258 |
)
|
| 259 |
|
| 260 |
if __name__ == "__main__":
|