loveisgone commited on
Commit
3982e4b
·
verified ·
1 Parent(s): 24543d9

Upload folder contents

Browse files
Files changed (13) hide show
  1. .gitattributes +1 -0
  2. CKPT.yaml +4 -0
  3. README.md +106 -0
  4. brain.ckpt +3 -0
  5. config.json +5 -0
  6. counter.ckpt +3 -0
  7. decoder.ckpt +3 -0
  8. encoder.ckpt +3 -0
  9. example_wham.wav +3 -0
  10. hyperparams.yaml +66 -0
  11. lr_scheduler.ckpt +3 -0
  12. masknet.ckpt +3 -0
  13. optimizer.ckpt +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ example_wham.wav filter=lfs diff=lfs merge=lfs -text
CKPT.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # yamllint disable
2
+ end-of-epoch: true
3
+ si-snr: -15.359142046070115
4
+ unixtime: 1638387953.7461503
README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: "en"
3
+ thumbnail:
4
+ tags:
5
+ - audio-to-audio
6
+ - Speech Enhancement
7
+ - WHAM!
8
+ - SepFormer
9
+ - Transformer
10
+ - pytorch
11
+ - speechbrain
12
+ license: "apache-2.0"
13
+ metrics:
14
+ - SI-SNR
15
+ - PESQ
16
+
17
+ ---
18
+
19
+ <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>
20
+ <br/><br/>
21
+
22
+ # SepFormer trained on WHAM! for speech enhancement (8k sampling frequency)
23
+ This repository provides all the necessary tools to perform speech enhancement (denoising) with a [SepFormer](https://arxiv.org/abs/2010.13154v2) model, implemented with SpeechBrain, and pretrained on [WHAM!](http://wham.whisper.ai/) dataset with 8k sampling frequency, which is basically a version of WSJ0-Mix dataset with environmental noise and reverberation in 8k. For a better experience we encourage you to learn more about [SpeechBrain](https://speechbrain.github.io). The given model performance is 14.35 dB SI-SNR on the test set of WHAM! dataset.
24
+
25
+
26
+ | Release | Test-Set SI-SNR | Test-Set PESQ |
27
+ |:-------------:|:--------------:|:--------------:|
28
+ | 01-12-21 | 14.35 | 3.07 |
29
+
30
+
31
+ ## Install SpeechBrain
32
+
33
+ First of all, please install SpeechBrain with the following command:
34
+
35
+ ```
36
+ pip install speechbrain
37
+ ```
38
+
39
+ Please notice that we encourage you to read our tutorials and learn more about [SpeechBrain](https://speechbrain.github.io).
40
+
41
+ ### Perform speech enhancement on your own audio file
42
+
43
+ ```python
44
+ from speechbrain.inference.separation import SepformerSeparation as separator
45
+ import torchaudio
46
+
47
+ model = separator.from_hparams(source="speechbrain/sepformer-wham-enhancement", savedir='pretrained_models/sepformer-wham-enhancement')
48
+
49
+ # for custom file, change path
50
+ est_sources = model.separate_file(path='speechbrain/sepformer-wham-enhancement/example_wham.wav')
51
+
52
+ torchaudio.save("enhanced_wham.wav", est_sources[:, :, 0].detach().cpu(), 8000)
53
+
54
+ ```
55
+
56
+ ### Inference on GPU
57
+ To perform inference on the GPU, add `run_opts={"device":"cuda"}` when calling the `from_hparams` method.
58
+
59
+ ### Training
60
+ The training script is currently being worked on an ongoing pull-request.
61
+
62
+ We will update the model card as soon as the PR is merged.
63
+
64
+ You can find our training results (models, logs, etc) [here](https://drive.google.com/drive/folders/1bbQvaiN-R79M697NnekA7Rr0jIYtO6e3).
65
+
66
+ ### Limitations
67
+ The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.
68
+
69
+ #### Referencing SpeechBrain
70
+
71
+ ```bibtex
72
+ @misc{speechbrain,
73
+ title={{SpeechBrain}: A General-Purpose Speech Toolkit},
74
+ 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},
75
+ year={2021},
76
+ eprint={2106.04624},
77
+ archivePrefix={arXiv},
78
+ primaryClass={eess.AS},
79
+ note={arXiv:2106.04624}
80
+ }
81
+ ```
82
+
83
+
84
+ #### Referencing SepFormer
85
+ ```bibtex
86
+ @inproceedings{subakan2021attention,
87
+ title={Attention is All You Need in Speech Separation},
88
+ author={Cem Subakan and Mirco Ravanelli and Samuele Cornell and Mirko Bronzi and Jianyuan Zhong},
89
+ year={2021},
90
+ booktitle={ICASSP 2021}
91
+ }
92
+
93
+ @article{subakan2023exploring,
94
+ author={Subakan, Cem and Ravanelli, Mirco and Cornell, Samuele and Grondin, François and Bronzi, Mirko},
95
+ journal={IEEE/ACM Transactions on Audio, Speech, and Language Processing},
96
+ title={Exploring Self-Attention Mechanisms for Speech Separation},
97
+ year={2023},
98
+ volume={31},
99
+ pages={2169-2180},
100
+ }
101
+ ```
102
+
103
+ # **About SpeechBrain**
104
+ - Website: https://speechbrain.github.io/
105
+ - Code: https://github.com/speechbrain/speechbrain/
106
+ - HuggingFace: https://huggingface.co/speechbrain/
brain.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9e24193f36931b7f57932532efbdcf64971f42732383ba6808825f77db258f6
3
+ size 28
config.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+
3
+ "speechbrain_interface": "SepformerSeparation"
4
+
5
+ }
counter.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65a699905c02619370bcf9207f5a477c3d67130ca71ec6f750e07fe8d510b084
3
+ size 3
decoder.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19e50784f377a79b514eb5664a0d6ac2841be0b2f6d8e21e77457875a4347514
3
+ size 17628
encoder.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:751d8918200ad05804f5ac20f46eecc34a91466a07e2bb42781bf564f315f245
3
+ size 17692
example_wham.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:47a294d20a02f8e933fc338f81054bf9b07f5b2257ab259be03ecdaa5f47826e
3
+ size 164992
hyperparams.yaml ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ################################
2
+ # Model: Pretrained SepFormer for speech enhancement
3
+ # Dataset : WHAM!
4
+ # ################################
5
+
6
+ num_spks: 1
7
+ sample_rate: 8000
8
+
9
+ # Encoder parameters
10
+ N_encoder_out: 256
11
+ out_channels: 256
12
+ kernel_size: 16
13
+ kernel_stride: 8
14
+
15
+ # Specifying the network
16
+ Encoder: !new:speechbrain.lobes.models.dual_path.Encoder
17
+ kernel_size: 16
18
+ out_channels: 256
19
+
20
+ SBtfintra: !new:speechbrain.lobes.models.dual_path.SBTransformerBlock
21
+ num_layers: 8
22
+ d_model: 256
23
+ nhead: 8
24
+ d_ffn: 1024
25
+ dropout: 0
26
+ use_positional_encoding: true
27
+ norm_before: true
28
+
29
+ SBtfinter: !new:speechbrain.lobes.models.dual_path.SBTransformerBlock
30
+ num_layers: 8
31
+ d_model: 256
32
+ nhead: 8
33
+ d_ffn: 1024
34
+ dropout: 0
35
+ use_positional_encoding: true
36
+ norm_before: true
37
+
38
+ MaskNet: !new:speechbrain.lobes.models.dual_path.Dual_Path_Model
39
+ num_spks: 1
40
+ in_channels: 256
41
+ out_channels: 256
42
+ num_layers: 2
43
+ K: 250
44
+ intra_model: !ref <SBtfintra>
45
+ inter_model: !ref <SBtfinter>
46
+ norm: ln
47
+ linear_layer_after_inter_intra: false
48
+ skip_around_intra: true
49
+
50
+ Decoder: !new:speechbrain.lobes.models.dual_path.Decoder
51
+ in_channels: 256
52
+ out_channels: 1
53
+ kernel_size: 16
54
+ stride: 8
55
+ bias: false
56
+
57
+ modules:
58
+ encoder: !ref <Encoder>
59
+ decoder: !ref <Decoder>
60
+ masknet: !ref <MaskNet>
61
+
62
+ pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
63
+ loadables:
64
+ encoder: !ref <Encoder>
65
+ masknet: !ref <MaskNet>
66
+ decoder: !ref <Decoder>
lr_scheduler.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0840f13c40bd42cf305668c49c51459d17e45634c63e9760d21e1ae76f930af
3
+ size 2036
masknet.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6647188f00277e570076178b1a5d53eaae171b6ff4139baf6043e10054fe9fc0
3
+ size 112839988
optimizer.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c658c95669088b11871cdf232d637b29a4e17a5e4270be7e26ba5f2eb5cda1f
3
+ size 205152122