Spaces:
Sleeping
Sleeping
add app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def denoise(inputs):
|
|
29 |
clean_chunk = MODEL(audio_chunk[None]).logits
|
30 |
clean.append(clean_chunk.squeeze(0))
|
31 |
|
32 |
-
denoised = torch.concat(clean)[
|
33 |
denoised = (denoised * 32767.0).numpy().astype("int16")
|
34 |
|
35 |
print(f"Denoised shape: {denoised.shape}")
|
|
|
29 |
clean_chunk = MODEL(audio_chunk[None]).logits
|
30 |
clean.append(clean_chunk.squeeze(0))
|
31 |
|
32 |
+
denoised = torch.concat(clean).flatten()[: audio.shape[-1]].clamp(-1.0, 1.0)
|
33 |
denoised = (denoised * 32767.0).numpy().astype("int16")
|
34 |
|
35 |
print(f"Denoised shape: {denoised.shape}")
|