Spaces:
Sleeping
Sleeping
add app.py
Browse files
app.py
CHANGED
@@ -34,8 +34,10 @@ def denoise(inputs):
|
|
34 |
.flatten()
|
35 |
.unsqueeze(0)[:, : audio.shape[-1]]
|
36 |
.clamp(-1.0, 1.0)
|
37 |
-
.numpy()
|
38 |
)
|
|
|
|
|
|
|
39 |
|
40 |
return MODEL.config.sample_rate, denoised
|
41 |
|
|
|
34 |
.flatten()
|
35 |
.unsqueeze(0)[:, : audio.shape[-1]]
|
36 |
.clamp(-1.0, 1.0)
|
|
|
37 |
)
|
38 |
+
denoised = (denoised * 32767.0).numpy().astype("int16")
|
39 |
+
|
40 |
+
print(f"Denoised shape: {denoised.shape}")
|
41 |
|
42 |
return MODEL.config.sample_rate, denoised
|
43 |
|