sangeet2020 commited on
Commit
e8c2585
1 Parent(s): 9ed220c

first commit for sepformer-dns

Browse files
Files changed (8) hide show
  1. README.md +130 -0
  2. brain.ckpt +3 -0
  3. config.json +3 -0
  4. decoder.ckpt +3 -0
  5. encoder.ckpt +3 -0
  6. example_dns16k.wav +0 -0
  7. hyperparams.yaml +67 -0
  8. masknet.ckpt +3 -0
README.md ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: "en","de","ru","fr","it","es"
3
+ thumbnail:
4
+ tags:
5
+ - audio-to-audio
6
+ - Speech Enhancement
7
+ - DNS-4
8
+ - SepFormer
9
+ - Transformer
10
+ - pytorch
11
+ - speechbrain
12
+ - Microsoft DNS Challenge
13
+ - Deep Noise Suppression Challenge – ICASSP 2022
14
+ license: "apache-2.0"
15
+ datasets:
16
+ - DNS-4
17
+ metrics:
18
+ - SI-SNR
19
+ - PESQ
20
+ - SIG
21
+ - BAK
22
+ - OVRL
23
+ model-index:
24
+ - name: sepformer-dns4-16k-enhancement
25
+ results:
26
+ - task:
27
+ name: Speech Enhancement
28
+ type: speech-enhancement
29
+ dataset:
30
+ name: DNS-4
31
+ type: https://www.microsoft.com/en-us/research/academic-program/deep-noise-suppression-challenge-icassp-2022/
32
+ split: baseline-dev-set
33
+ args:
34
+ language: de
35
+ metrics:
36
+ - name: DNSMOS SIG
37
+ type: sig
38
+ value: '2.999'
39
+ - name: DNSMOS BAK
40
+ type: bak
41
+ value: '3.076'
42
+ - name: DNSMOS OVRL
43
+ type: ovrl
44
+ value: '2.437'
45
+ ---
46
+
47
+ <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>
48
+ <br/><br/>
49
+
50
+ # SepFormer trained on Microsoft DNS-4 (Deep Noise Suppression Challenge 4 – ICASSP 2022) for speech enhancement (16k sampling frequency)
51
+ 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. The model is trained on 1300HRS of Microsoft-DNS 4 dataset with 16k sampling frequency. For a better experience we encourage you to learn more about [SpeechBrain](https://speechbrain.github.io). Evaluation on DNS4 2022 baseline dev set using DNSMOS are-
52
+
53
+
54
+ | Release | SIG | BAK | OVRL |
55
+ |:-------------:|:--------------:|:--------------:|:--------------:|
56
+ | 08-01-23 | 2.999 | 3.076 | 2.437 |
57
+
58
+ DNSMOS - deep noise suppression (DNS)- mean opinion score (MOS) is a non-intrusive evaluation metric. It computes 3 scores– SIG (speech quality), BAK (background noise quality), and OVRL (overall quality) each on a scale of 1 to 5, with 5 being the best quality.
59
+
60
+ ## Install SpeechBrain
61
+
62
+ First of all, please install SpeechBrain with the following command:
63
+
64
+ ```
65
+ pip install speechbrain
66
+ ```
67
+
68
+ Please notice that we encourage you to read our tutorials and learn more about [SpeechBrain](https://speechbrain.github.io).
69
+
70
+ ### Perform speech enhancement on your own audio file
71
+
72
+ ```python
73
+ from speechbrain.pretrained import SepformerSeparation as separator
74
+ import torchaudio
75
+
76
+ model = separator.from_hparams(source="speechbrain/sepformer-dns4-16k-enhancement", savedir='pretrained_models/sepformer-dns4-16k-enhancement')
77
+
78
+ # for custom file, change path
79
+ est_sources = model.separate_file(path='speechbrain/sepformer-dns4-16k-enhancement/example_dns4-16k.wav')
80
+
81
+ torchaudio.save("enhanced_dns4-16k.wav", est_sources[:, :, 0].detach().cpu(), 16000)
82
+
83
+ ```
84
+
85
+ ### Inference on GPU
86
+ To perform inference on the GPU, add `run_opts={"device":"cuda"}` when calling the `from_hparams` method.
87
+
88
+ You can find our training results (models, logs, etc) [here](https://www.dropbox.com/sh/02c3wesc65402f6/AAApoxBApft-JwqHK-bddedBa?dl=0).
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
+ ```bibtex
95
+ @misc{speechbrain,
96
+ title={{SpeechBrain}: A General-Purpose Speech Toolkit},
97
+ 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},
98
+ year={2021},
99
+ eprint={2106.04624},
100
+ archivePrefix={arXiv},
101
+ primaryClass={eess.AS},
102
+ note={arXiv:2106.04624}
103
+ }
104
+ ```
105
+
106
+ ### Referencing SepFormer
107
+ ```bibtex
108
+ @inproceedings{subakan2021attention,
109
+ title={Attention is All You Need in Speech Separation},
110
+ author={Cem Subakan and Mirco Ravanelli and Samuele Cornell and Mirko Bronzi and Jianyuan Zhong},
111
+ year={2021},
112
+ booktitle={ICASSP 2021}
113
+ }
114
+ ```
115
+
116
+ ### Referencing ICASSP 2022 Deep Noise Suppression Challenge
117
+ ```bibtex
118
+ @inproceedings{dubey2022icassp,
119
+ title={ICASSP 2022 Deep Noise Suppression Challenge},
120
+ author={Dubey, Harishchandra and Gopal, Vishak and Cutler, Ross and Matusevych, Sergiy and Braun, Sebastian and Eskimez, Emre Sefik and Thakker, Manthan and Yoshioka, Takuya and Gamper, Hannes and Aichner, Robert},
121
+ booktitle={ICASSP},
122
+ year={2022}
123
+ }
124
+ ```
125
+
126
+
127
+ # **About SpeechBrain**
128
+ - Website: https://speechbrain.github.io/
129
+ - Code: https://github.com/speechbrain/speechbrain/
130
+ - HuggingFace: https://huggingface.co/speechbrain/
brain.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:33809a026a2c1febce7b03c8aafaee4ddfc851b2c70f180f8c06bf1017f4df5c
3
+ size 46
config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "speechbrain_interface": "SepformerSeparation"
3
+ }
decoder.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab10ab1aac337bbe77ad0cbdf75acb1fba952e2d34474d515de2f41ddfd9a24c
3
+ size 17195
encoder.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:33de46bbf0b55031f92346827723137478cf2f77204fd1360ba8833b5915e0ee
3
+ size 17259
example_dns16k.wav ADDED
Binary file (256 kB). View file
 
hyperparams.yaml ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Generated 2023-02-21 from:
2
+ # /netscratch/sagar/thesis/speechbrain/recipes/DNS/enhancement/hparams/resume-sepformer-dns_16k.yaml
3
+ # yamllint disable
4
+ # ################################
5
+ # Model: SepFormer for source separation
6
+ # https://arxiv.org/abs/2010.13154
7
+ #
8
+ # Author: Sangeet Sagar 2022
9
+ # Dataset : Microsoft-DNS
10
+ # ################################
11
+
12
+ # Basic parameters
13
+ sample_rate: 16000
14
+ num_spks: 1
15
+
16
+ # Specifying the network
17
+ Encoder: &id003 !new:speechbrain.lobes.models.dual_path.Encoder
18
+ kernel_size: 16
19
+ out_channels: 256
20
+
21
+ SBtfintra: &id001 !new:speechbrain.lobes.models.dual_path.SBTransformerBlock
22
+ num_layers: 8
23
+ d_model: 256
24
+ nhead: 8
25
+ d_ffn: 1024
26
+ dropout: 0
27
+ use_positional_encoding: true
28
+ norm_before: true
29
+
30
+ SBtfinter: &id002 !new:speechbrain.lobes.models.dual_path.SBTransformerBlock
31
+ num_layers: 8
32
+ d_model: 256
33
+ nhead: 8
34
+ d_ffn: 1024
35
+ dropout: 0
36
+ use_positional_encoding: true
37
+ norm_before: true
38
+
39
+ MaskNet: &id005 !new:speechbrain.lobes.models.dual_path.Dual_Path_Model
40
+ num_spks: 1
41
+ in_channels: 256
42
+ out_channels: 256
43
+ num_layers: 2
44
+ K: 250
45
+ intra_model: *id001
46
+ inter_model: *id002
47
+ norm: ln
48
+ linear_layer_after_inter_intra: false
49
+ skip_around_intra: true
50
+
51
+ Decoder: &id004 !new:speechbrain.lobes.models.dual_path.Decoder
52
+ in_channels: 256
53
+ out_channels: 1
54
+ kernel_size: 16
55
+ stride: 8
56
+ bias: false
57
+
58
+ modules:
59
+ encoder: *id003
60
+ decoder: *id004
61
+ masknet: *id005
62
+
63
+ pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
64
+ loadables:
65
+ encoder: !ref <Encoder>
66
+ masknet: !ref <MaskNet>
67
+ decoder: !ref <Decoder>
masknet.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfba4276bf051fc48b1d49350ef0612845328c1999cefb4c637fc02cdbabbbdd
3
+ size 112839555