gorkemgoknar commited on
Commit
2bdda58
1 Parent(s): 9102540

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -193,15 +193,14 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, voice_clea
193
  try:
194
  gpt_cond_latent, _, speaker_embedding = model.get_conditioning_latents(audio_path=speaker_wav)
195
  except Exception as e:
196
- if "Failed to decode" in str(e):
197
- print("Speaker encoding error", str(e))
198
- gr.Warning("It appears something wrong with reference, did you unmute your microphone?")
199
- return (
200
- None,
201
- None,
202
- None,
203
- None,
204
- )
205
 
206
  latent_calculation_time = time.time() - t_latent
207
  ##metrics_text=f"Embedding calculation time: {latent_calculation_time:.2f} seconds\n"
 
193
  try:
194
  gpt_cond_latent, _, speaker_embedding = model.get_conditioning_latents(audio_path=speaker_wav)
195
  except Exception as e:
196
+ print("Speaker encoding error", str(e))
197
+ gr.Warning("It appears something wrong with reference, did you unmute your microphone?")
198
+ return (
199
+ None,
200
+ None,
201
+ None,
202
+ None,
203
+ )
 
204
 
205
  latent_calculation_time = time.time() - t_latent
206
  ##metrics_text=f"Embedding calculation time: {latent_calculation_time:.2f} seconds\n"