wrice commited on
Commit
7ca9435
1 Parent(s): 3d1e219

handle multi-channel audio

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -44,7 +44,7 @@ def denoise(model_name, inputs):
44
  for i in tqdm(range(0, padded.shape[-1], chunk_size)):
45
  audio_chunk = padded[:, :, i : i + chunk_size]
46
  with torch.no_grad():
47
- clean_chunk = model(audio_chunk).logits
48
  clean.append(clean_chunk.squeeze(0))
49
 
50
  denoised = torch.concat(clean, 1)[:, : audio.shape[-1]].clamp(-1.0, 1.0)
 
44
  for i in tqdm(range(0, padded.shape[-1], chunk_size)):
45
  audio_chunk = padded[:, :, i : i + chunk_size]
46
  with torch.no_grad():
47
+ clean_chunk = model(audio_chunk).audio
48
  clean.append(clean_chunk.squeeze(0))
49
 
50
  denoised = torch.concat(clean, 1)[:, : audio.shape[-1]].clamp(-1.0, 1.0)