yasserrmd commited on
Commit
9d002d8
·
verified ·
1 Parent(s): bc135da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -10,6 +10,7 @@ import os
10
  import tempfile
11
  import shutil
12
  import spaces
 
13
 
14
 
15
 
@@ -80,9 +81,11 @@ def generate_audio_from_modified_text(tts_ready_text,session_dir):
80
 
81
  # Generate audio from the TTS-ready transcript
82
  #tts_gen = TTSGenerator(tts_ready_path,audio_output_path)
83
- tts_gen = EdgeTTSGenerator(tts_ready_path,audio_output_path)
84
- audio_path = tts_gen.generate_audio()
85
 
 
 
86
  return f"Step 4 complete. Audio saved to {audio_path}.", audio_path
87
 
88
 
 
10
  import tempfile
11
  import shutil
12
  import spaces
13
+ import asyncio
14
 
15
 
16
 
 
81
 
82
  # Generate audio from the TTS-ready transcript
83
  #tts_gen = TTSGenerator(tts_ready_path,audio_output_path)
84
+ #audio_path = tts_gen.generate_audio()
85
+ #return f"Step 4 complete. Audio saved to {audio_path}.", audio_path
86
 
87
+ tts_gen = EdgeTTSGenerator(tts_ready_path,audio_output_path)
88
+ audio_path=asyncio.run(generator.generate_audio())
89
  return f"Step 4 complete. Audio saved to {audio_path}.", audio_path
90
 
91