younver commited on
Commit
8d40772
1 Parent(s): 2fd3b9f

fix: audio path

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ import gradio as gr
5
  model = separator.from_hparams(source="speechbrain/sepformer-wsj02mix", savedir='pretrained_models/sepformer-wsj02mix')
6
 
7
  def speechbrain(aud):
8
- est_sources = model.separate_file(path=aud.name)
9
  torchaudio.save("source1hat.wav", est_sources[:, :, 0].detach().cpu(), 8000)
10
  torchaudio.save("source2hat.wav", est_sources[:, :, 1].detach().cpu(), 8000)
11
  return "source1hat.wav", "source2hat.wav"
 
5
  model = separator.from_hparams(source="speechbrain/sepformer-wsj02mix", savedir='pretrained_models/sepformer-wsj02mix')
6
 
7
  def speechbrain(aud):
8
+ est_sources = model.separate_file(path=aud)
9
  torchaudio.save("source1hat.wav", est_sources[:, :, 0].detach().cpu(), 8000)
10
  torchaudio.save("source2hat.wav", est_sources[:, :, 1].detach().cpu(), 8000)
11
  return "source1hat.wav", "source2hat.wav"