Spaces:
Runtime error
Runtime error
Hendrik Schroeter
commited on
Commit
•
3c652e4
1
Parent(s):
9240be0
add print
Browse files
app.py
CHANGED
@@ -61,12 +61,12 @@ def mix_and_denoise(speech, speech_alt, noise, snr):
|
|
61 |
enhanced = enhance(model, df, noisy)
|
62 |
lim = torch.linspace(0.0, 1.0, int(sr * 0.15)).unsqueeze(0)
|
63 |
lim = torch.cat((lim, torch.ones(1, enhanced.shape[1] - lim.shape[1])), dim=1)
|
64 |
-
print("lim", lim.shape, enhanced.shape)
|
65 |
enhanced = enhanced * lim
|
66 |
noisy_fn = tempfile.NamedTemporaryFile(suffix="noisy.wav", delete=False).name
|
67 |
save_audio(noisy_fn, noisy, sr)
|
68 |
enhanced_fn = tempfile.NamedTemporaryFile(suffix="enhanced.wav", delete=False).name
|
69 |
save_audio(enhanced_fn, enhanced, sr)
|
|
|
70 |
return (
|
71 |
noisy_fn,
|
72 |
spec_figure(noisy, sr=sr),
|
|
|
61 |
enhanced = enhance(model, df, noisy)
|
62 |
lim = torch.linspace(0.0, 1.0, int(sr * 0.15)).unsqueeze(0)
|
63 |
lim = torch.cat((lim, torch.ones(1, enhanced.shape[1] - lim.shape[1])), dim=1)
|
|
|
64 |
enhanced = enhanced * lim
|
65 |
noisy_fn = tempfile.NamedTemporaryFile(suffix="noisy.wav", delete=False).name
|
66 |
save_audio(noisy_fn, noisy, sr)
|
67 |
enhanced_fn = tempfile.NamedTemporaryFile(suffix="enhanced.wav", delete=False).name
|
68 |
save_audio(enhanced_fn, enhanced, sr)
|
69 |
+
print("saved audios", noisy_fn, enhanced_fn)
|
70 |
return (
|
71 |
noisy_fn,
|
72 |
spec_figure(noisy, sr=sr),
|