Hendrik Schroeter commited on
Commit
8ef56f7
1 Parent(s): d929b06
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -137,10 +137,10 @@ def demo_fn(speech_upl: str, noise_type: str, snr: int):
137
  sample = resample(sample, sr, meta.sample_rate)
138
  sr = meta.sample_rate
139
  noisy_wav = tempfile.NamedTemporaryFile(suffix="noisy.wav", delete=False).name
140
- save_audio(noisy_fn, sample, sr)
141
  enhanced_wav = tempfile.NamedTemporaryFile(suffix="enhanced.wav", delete=False).name
142
- save_audio(enhanced_fn, enhanced, sr)
143
- logger.info(f"saved audios: {noisy_fn}, {enhanced_fn}")
144
  ax_noisy.clear()
145
  ax_enh.clear()
146
  noisy_im = spec_im(sample, sr=sr, figure=fig_noisy, ax=ax_noisy)
 
137
  sample = resample(sample, sr, meta.sample_rate)
138
  sr = meta.sample_rate
139
  noisy_wav = tempfile.NamedTemporaryFile(suffix="noisy.wav", delete=False).name
140
+ save_audio(noisy_wav, sample, sr)
141
  enhanced_wav = tempfile.NamedTemporaryFile(suffix="enhanced.wav", delete=False).name
142
+ save_audio(enhanced_wav, enhanced, sr)
143
+ logger.info(f"saved audios: {noisy_wav}, {enhanced_wav}")
144
  ax_noisy.clear()
145
  ax_enh.clear()
146
  noisy_im = spec_im(sample, sr=sr, figure=fig_noisy, ax=ax_noisy)