sheikhed commited on
Commit
14d37e3
·
verified ·
1 Parent(s): cbbff10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -147,10 +147,9 @@ def process_input(voice, model, text, audio_file, progress=gr.Progress()):
147
  if not input_audio_path:
148
  return None, "Failed to generate speech audio."
149
 
150
- elif audio_file:
151
  progress(0, desc="Using uploaded audio...")
152
- input_audio_path = audio_file.name
153
-
154
  else:
155
  return None, "Please provide either text or upload an audio file."
156
 
 
147
  if not input_audio_path:
148
  return None, "Failed to generate speech audio."
149
 
150
+ elif audio_file:
151
  progress(0, desc="Using uploaded audio...")
152
+ input_audio_path = audio_file # Use the file path directly
 
153
  else:
154
  return None, "Please provide either text or upload an audio file."
155