Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ def extract_text(docx_file):
|
|
| 16 |
def generate_audio(docx_file):
|
| 17 |
text = extract_text(docx_file.name)
|
| 18 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as temp_audio:
|
| 19 |
-
tts.tts_to_file(text=text, file_path=
|
| 20 |
return temp_audio.name
|
| 21 |
|
| 22 |
# Gradio UI
|
|
|
|
| 16 |
def generate_audio(docx_file):
|
| 17 |
text = extract_text(docx_file.name)
|
| 18 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as temp_audio:
|
| 19 |
+
tts.tts_to_file(text=text, file_path="output.wav")
|
| 20 |
return temp_audio.name
|
| 21 |
|
| 22 |
# Gradio UI
|