wrice commited on
Commit
1919a07
·
1 Parent(s): 9ac6d71

add app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)[:, : audio.shape[-1]].squeeze().clamp(-1.0, 1.0)
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}")