SohomToom commited on
Commit
3a9c6ec
·
verified ·
1 Parent(s): f5a1a98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -15,9 +15,8 @@ def extract_text(docx_file):
15
 
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
23
  interface = gr.Interface(
 
15
 
16
  def generate_audio(docx_file):
17
  text = extract_text(docx_file.name)
18
+ tts.tts_to_file(text=text, file_path="output.wav")
19
+ return "output.wav"
 
20
 
21
  # Gradio UI
22
  interface = gr.Interface(