cemsubakan commited on
Commit
fc5ea2a
·
1 Parent(s): 74788d3

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +116 -0
README.md ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: "en"
3
+ thumbnail:
4
+ tags:
5
+ - Source Separation
6
+ - Speech Separation
7
+ - Audio Source Separation
8
+ - WSJ02Mix
9
+ - SepFormer
10
+ - Transformer
11
+ - audio-to-audio
12
+ - audio-source-separation
13
+ - speechbrain
14
+ license: "apache-2.0"
15
+ datasets:
16
+ - WSJ0-2Mix
17
+ metrics:
18
+ - SI-SNRi
19
+ - SDRi
20
+
21
+ ---
22
+
23
+ <iframe src="https://ghbtns.com/github-btn.html?user=speechbrain&repo=speechbrain&type=star&count=true&size=large&v=2" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>
24
+ <br/><br/>
25
+
26
+ # RE-SepFormer trained on WSJ0-2Mix
27
+
28
+ This repository provides all the necessary tools to perform audio source separation with a RE-SepFormer
29
+ model, implemented with SpeechBrain, and pretrained on WSJ0-2Mix dataset. For a better experience we encourage you to learn more about
30
+ [SpeechBrain](https://speechbrain.github.io). The model performance is 18.6 dB on the test set of WSJ0-2Mix dataset.
31
+
32
+ | Release | Test-Set SI-SNRi | Test-Set SDRi |
33
+ |:-------------:|:--------------:|:--------------:|
34
+ | 19-06-22 | 18.6dB | 18.9dB |
35
+
36
+
37
+ ## Install SpeechBrain
38
+
39
+ First of all, please install SpeechBrain with the following command:
40
+
41
+ ```
42
+ pip install speechbrain
43
+ ```
44
+
45
+ Please notice that we encourage you to read our tutorials and learn more about
46
+ [SpeechBrain](https://speechbrain.github.io).
47
+
48
+ ### Perform source separation on your own audio file
49
+ ```python
50
+ from speechbrain.pretrained import SepformerSeparation as separator
51
+ import torchaudio
52
+
53
+ model = separator.from_hparams(source="speechbrain/resepformer-wsj02mix", savedir='pretrained_models/resepformer-wsj02mix')
54
+
55
+ # for custom file, change path
56
+ est_sources = model.separate_file(path='speechbrain/resepformer-wsj02mix/test_mixture.wav')
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
+
68
+ ### Training
69
+ The model was trained with SpeechBrain (fc2eabb7).
70
+ To train it from scratch follows these steps:
71
+ 1. Clone SpeechBrain:
72
+ ```bash
73
+ git clone https://github.com/speechbrain/speechbrain/
74
+ ```
75
+ 2. Install it:
76
+ ```
77
+ cd speechbrain
78
+ pip install -r requirements.txt
79
+ pip install -e .
80
+ ```
81
+
82
+ 3. Run Training:
83
+ ```
84
+ cd recipes/WSJ0Mix/separation
85
+ python train.py hparams/sepformer.yaml --data_folder=your_data_folder
86
+ ```
87
+
88
+ You can find our training results (models, logs, etc) [here](https://drive.google.com/drive/folders/1cON-eqtKv_NYnJhaE9VjLT_e2ybn-O7u?usp=sharing).
89
+
90
+ ### Limitations
91
+ The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.
92
+
93
+ #### Referencing SpeechBrain
94
+
95
+ ```bibtex
96
+ @misc{speechbrain,
97
+ title={{SpeechBrain}: A General-Purpose Speech Toolkit},
98
+ author={Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio},
99
+ year={2021},
100
+ eprint={2106.04624},
101
+ archivePrefix={arXiv},
102
+ primaryClass={eess.AS},
103
+ note={arXiv:2106.04624}
104
+ }
105
+ ```
106
+
107
+
108
+ #### Referencing RE-SepFormer
109
+ ```bibtex
110
+
111
+ ```
112
+
113
+ # **About SpeechBrain**
114
+ - Website: https://speechbrain.github.io/
115
+ - Code: https://github.com/speechbrain/speechbrain/
116
+ - HuggingFace: https://huggingface.co/speechbrain/