Audio-to-Audio
speechbrain
English
Source Separation
Speech Separation
Audio Source Separation
WSJ02Mix
SepFormer
Transformer
audio-source-separation
Instructions to use speechbrain/sepformer-wsj02mix with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- speechbrain
How to use speechbrain/sepformer-wsj02mix with speechbrain:
from speechbrain.pretrained import SepformerSeparation model = SepformerSeparation.from_hparams( "speechbrain/sepformer-wsj02mix" ) model.separate_file("file.wav") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -57,9 +57,11 @@ est_sources = model.separate_file(path='speechbrain/sepformer-wsj02mix/test_mixt
|
|
| 57 |
|
| 58 |
torchaudio.save("source1hat.wav", est_sources[:, :, 0].detach().cpu(), 8000)
|
| 59 |
torchaudio.save("source2hat.wav", est_sources[:, :, 1].detach().cpu(), 8000)
|
| 60 |
-
|
| 61 |
```
|
| 62 |
|
|
|
|
|
|
|
|
|
|
| 63 |
### Inference on GPU
|
| 64 |
To perform inference on the GPU, add `run_opts={"device":"cuda"}` when calling the `from_hparams` method.
|
| 65 |
|
|
|
|
| 57 |
|
| 58 |
torchaudio.save("source1hat.wav", est_sources[:, :, 0].detach().cpu(), 8000)
|
| 59 |
torchaudio.save("source2hat.wav", est_sources[:, :, 1].detach().cpu(), 8000)
|
|
|
|
| 60 |
```
|
| 61 |
|
| 62 |
+
The system expects input recordings sampled at 8kHz (single channel).
|
| 63 |
+
If your signal has a different sample rate, resample it (e.g, using torchaudio or sox) before using the interface.
|
| 64 |
+
|
| 65 |
### Inference on GPU
|
| 66 |
To perform inference on the GPU, add `run_opts={"device":"cuda"}` when calling the `from_hparams` method.
|
| 67 |
|