Spaces:
Running
Running
Hendrik Schroeter
commited on
Commit
•
8ef56f7
1
Parent(s):
d929b06
wip
Browse files
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(
|
141 |
enhanced_wav = tempfile.NamedTemporaryFile(suffix="enhanced.wav", delete=False).name
|
142 |
-
save_audio(
|
143 |
-
logger.info(f"saved audios: {
|
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)
|