Hendrik Schroeter commited on
Commit
5ce2a93
1 Parent(s): 2527d95
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -54,7 +54,7 @@ def mix_at_snr(clean, noise, snr, eps=1e-10):
54
 
55
  def mix_and_denoise(speech_rec, speech_upl, noise, snr):
56
  sr = config("sr", 48000, int, section="df")
57
- print(speech_rec, noise, snr)
58
  if noise is None:
59
  noise = "samples/dkitchen.wav"
60
  sp_kwargs = {}
@@ -66,7 +66,7 @@ def mix_and_denoise(speech_rec, speech_upl, noise, snr):
66
  else:
67
  speech = speech_rec
68
  sp_kwargs = {"frame_offset": 4800}
69
- speech, _ = load_audio(speech_rec, sr, **sp_kwargs)
70
  print(f"Loaded speech with shape {speech.shape}")
71
  noise, _ = load_audio(noise, sr)
72
  print(f"Loaded noise with shape {noise.shape}")
 
54
 
55
  def mix_and_denoise(speech_rec, speech_upl, noise, snr):
56
  sr = config("sr", 48000, int, section="df")
57
+ print(speech_rec, speech_upl, noise, snr)
58
  if noise is None:
59
  noise = "samples/dkitchen.wav"
60
  sp_kwargs = {}
 
66
  else:
67
  speech = speech_rec
68
  sp_kwargs = {"frame_offset": 4800}
69
+ speech, _ = load_audio(speech, sr, **sp_kwargs)
70
  print(f"Loaded speech with shape {speech.shape}")
71
  noise, _ = load_audio(noise, sr)
72
  print(f"Loaded noise with shape {noise.shape}")