Hendrik Schroeter commited on
Commit
c95e04f
·
unverified ·
1 Parent(s): 102636c
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -82,8 +82,7 @@ def mix_and_denoise(speech_rec, speech_upl, noise, snr):
82
  print(meta)
83
  break
84
  if meta is None:
85
- logger.error("Could not load recorded speech")
86
- return(1)
87
  logger.info(f"Loaded speech with shape {speech.shape}")
88
  noise, _ = load_audio(noise, sr)
89
  if meta.sample_rate != sr:
 
82
  print(meta)
83
  break
84
  if meta is None:
85
+ raise ValueError("Could not load recorded speech")
 
86
  logger.info(f"Loaded speech with shape {speech.shape}")
87
  noise, _ = load_audio(noise, sr)
88
  if meta.sample_rate != sr: