cemsubakan commited on
Commit
297cd7c
1 Parent(s): 8b20466

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +181 -0
README.md ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+
3
+ language: "en"
4
+
5
+ thumbnail:
6
+
7
+ tags:
8
+
9
+ - audio-to-audio
10
+
11
+ - audio-source-separation
12
+
13
+ - Source Separation
14
+
15
+ - Speech Separation
16
+
17
+ - WHAM!
18
+
19
+ - SepFormer
20
+
21
+ - Transformer
22
+
23
+ - pytorch
24
+
25
+ - speechbrain
26
+
27
+ license: "apache-2.0"
28
+
29
+ datasets:
30
+
31
+ - WHAMR!
32
+
33
+ metrics:
34
+
35
+ - SI-SNRi
36
+
37
+ - SDRi
38
+
39
+ ---
40
+
41
+ <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>
42
+
43
+ <br/><br/>
44
+
45
+ # SepFormer trained on WHAMR! (16k sampling frequency)
46
+
47
+ This repository provides all the necessary tools to perform audio source separation with a [SepFormer](https://arxiv.org/abs/2010.13154v2) model, implemented with SpeechBrain, and pretrained on [WHAMR!](http://wham.whisper.ai/) dataset with 16k sampling frequency, which is basically a version of WSJ0-Mix dataset with environmental noise and reverberation in 16k. For a better experience we encourage you to learn more about [SpeechBrain](https://speechbrain.github.io). The given model performance is 13.5 dB SI-SNRi on the test set of WHAMR! dataset.
48
+
49
+ | Release | Test-Set SI-SNRi | Test-Set SDRi |
50
+
51
+ |:-------------:|:--------------:|:--------------:|
52
+
53
+ | 30-03-21 | 13.5 dB | 13.0 dB |
54
+
55
+ ## Install SpeechBrain
56
+
57
+ First of all, please install SpeechBrain with the following command:
58
+
59
+ ```
60
+
61
+ pip install speechbrain
62
+
63
+ ```
64
+
65
+ Please notice that we encourage you to read our tutorials and learn more about [SpeechBrain](https://speechbrain.github.io).
66
+
67
+ ### Perform source separation on your own audio file
68
+
69
+ ```python
70
+
71
+ from speechbrain.pretrained import SepformerSeparation as separator
72
+
73
+ import torchaudio
74
+
75
+ model = separator.from_hparams(source="speechbrain/sepformer-whamr16k", savedir='pretrained_models/sepformer-whamr16k')
76
+
77
+ # for custom file, change path
78
+
79
+ est_sources = model.separate_file(path='speechbrain/sepformer-whamr16k/test_mixture16k.wav')
80
+
81
+ torchaudio.save("source1hat.wav", est_sources[:, :, 0].detach().cpu(), 16000)
82
+
83
+ torchaudio.save("source2hat.wav", est_sources[:, :, 1].detach().cpu(), 16000)
84
+
85
+ ```
86
+
87
+ ### Inference on GPU
88
+
89
+ To perform inference on the GPU, add `run_opts={"device":"cuda"}` when calling the `from_hparams` method.
90
+
91
+ ### Training
92
+
93
+ The model was trained with SpeechBrain (fc2eabb7).
94
+
95
+ To train it from scratch follows these steps:
96
+
97
+ 1. Clone SpeechBrain:
98
+
99
+ ```bash
100
+
101
+ git clone https://github.com/speechbrain/speechbrain/
102
+
103
+ ```
104
+
105
+ 2. Install it:
106
+
107
+ ```
108
+
109
+ cd speechbrain
110
+
111
+ pip install -r requirements.txt
112
+
113
+ pip install -e .
114
+
115
+ ```
116
+
117
+ 3. Run Training:
118
+
119
+ ```
120
+
121
+ cd recipes/WHAMandWHAMR/separation/
122
+
123
+ python train.py hparams/sepformer-whamr.yaml --data_folder=your_data_folder --sample_rate=16000
124
+
125
+ ```
126
+
127
+ You can find our training results (models, logs, etc) [here](https://drive.google.com/drive/folders/1QiQhp1vi5t4UfNpNETA48_OmPiXnUy8O?usp=sharing).
128
+
129
+ ### Limitations
130
+
131
+ The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.
132
+
133
+ #### Referencing SpeechBrain
134
+
135
+ ```bibtex
136
+
137
+ @misc{speechbrain,
138
+
139
+ title={{SpeechBrain}: A General-Purpose Speech Toolkit},
140
+
141
+ 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},
142
+
143
+ year={2021},
144
+
145
+ eprint={2106.04624},
146
+
147
+ archivePrefix={arXiv},
148
+
149
+ primaryClass={eess.AS},
150
+
151
+ note={arXiv:2106.04624}
152
+
153
+ }
154
+
155
+ ```
156
+
157
+ #### Referencing SepFormer
158
+
159
+ ```bibtex
160
+
161
+ @inproceedings{subakan2021attention,
162
+
163
+ title={Attention is All You Need in Speech Separation},
164
+
165
+ author={Cem Subakan and Mirco Ravanelli and Samuele Cornell and Mirko Bronzi and Jianyuan Zhong},
166
+
167
+ year={2021},
168
+
169
+ booktitle={ICASSP 2021}
170
+
171
+ }
172
+
173
+ ```
174
+
175
+ # **About SpeechBrain**
176
+
177
+ - Website: https://speechbrain.github.io/
178
+
179
+ - Code: https://github.com/speechbrain/speechbrain/
180
+
181
+ - HuggingFace: https://huggingface.co/speechbrain/