pradnya-hf-dev commited on
Commit
6f14ac6
1 Parent(s): 1ca7c8a

initial README.md

Browse files
Files changed (1) hide show
  1. README.md +120 -1
README.md CHANGED
@@ -1 +1,120 @@
1
- Work in progress
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: "en"
3
+ thumbnail:
4
+ tags:
5
+ - speechbrain
6
+ - embeddings
7
+ - Speaker
8
+ - Identification
9
+ - pytorch
10
+ - ECAPA
11
+ - TDNN
12
+ license: "apache-2.0"
13
+ datasets:
14
+ - voxceleb
15
+ ---
16
+
17
+ <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>
18
+ <br/><br/>
19
+
20
+ # Mel-Spectrogram-based ECAPA-TDNN embeddings on Voxceleb
21
+ ### Note: This is a work in progress. This model is intended to be used with a Zero-Shot Multi-Speaker Text-to-Speech (TTS) model available [here](https://huggingface.co/speechbrain/tts-mstacotron2-libritts).
22
+
23
+ This repository provides all the necessary tools to extract speaker embeddings using a pretrained ECAPA-TDNN model using SpeechBrain.
24
+ Please note that this model is created for zero-shot multi-speaker TTS, and uses a mel-spectrogram as the input feature. It is trained on Voxceleb 1+ Voxceleb2 training data.
25
+
26
+ ## Pipeline description
27
+
28
+ This system is composed of an ECAPA-TDNN model. It is a combination of convolutional and residual blocks. The embeddings are extracted using attentive statistical pooling. The system is trained with Additive Margin Softmax Loss.
29
+
30
+ ## Install SpeechBrain
31
+
32
+ First of all, please install SpeechBrain with the following command:
33
+
34
+ ```
35
+ pip install speechbrain
36
+ ```
37
+
38
+ Please notice that we encourage you to read our tutorials and learn more about
39
+ [SpeechBrain](https://speechbrain.github.io).
40
+
41
+ ### Compute your speaker embeddings
42
+
43
+ ```python
44
+ import torchaudio
45
+ from speechbrain.pretrained import MelSpectrogramEncoder
46
+ spk_emb_encoder = MelSpectrogramEncoder.from_hparams(source="speechbrain/spkrec-ecapa-voxceleb-mel-spec")
47
+
48
+ INPUT_SPEECH = "speech_sample.wav"
49
+ ref_signal, signal_sr = torchaudio.load(INPUT_SPEECH)
50
+ spk_embedding = spk_emb_encoder.encode_waveform(ref_signal)
51
+ ```
52
+ The system is trained with recordings sampled at 16kHz (single channel).
53
+
54
+
55
+ ### Inference on GPU
56
+ To perform inference on the GPU, add `run_opts={"device":"cuda"}` when calling the `from_hparams` method.
57
+
58
+ ### Training
59
+ The model was trained with SpeechBrain (aa018540).
60
+ To train it from scratch follows these steps:
61
+ 1. Clone SpeechBrain:
62
+ ```bash
63
+ git clone https://github.com/speechbrain/speechbrain/
64
+ ```
65
+ 2. Install it:
66
+ ```
67
+ cd speechbrain
68
+ pip install -r requirements.txt
69
+ pip install -e .
70
+ ```
71
+
72
+ 3. Run Training:
73
+ ```
74
+ cd recipes/VoxCeleb/SpeakerRec
75
+ python train_speaker_embeddings.py hparams/train_ecapa_tdnn_mel_spec.yaml --data_folder=your_data_folder --sample_rate=16000
76
+ ```
77
+
78
+ The training logs will be available here in the future.
79
+
80
+
81
+ ### Limitations
82
+ The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.
83
+
84
+ #### Referencing ECAPA-TDNN
85
+ ```
86
+ @inproceedings{DBLP:conf/interspeech/DesplanquesTD20,
87
+ author = {Brecht Desplanques and
88
+ Jenthe Thienpondt and
89
+ Kris Demuynck},
90
+ editor = {Helen Meng and
91
+ Bo Xu and
92
+ Thomas Fang Zheng},
93
+ title = {{ECAPA-TDNN:} Emphasized Channel Attention, Propagation and Aggregation
94
+ in {TDNN} Based Speaker Verification},
95
+ booktitle = {Interspeech 2020},
96
+ pages = {3830--3834},
97
+ publisher = {{ISCA}},
98
+ year = {2020},
99
+ }
100
+ ```
101
+
102
+ # **Citing SpeechBrain**
103
+ Please, cite SpeechBrain if you use it for your research or business.
104
+
105
+ ```bibtex
106
+ @misc{speechbrain,
107
+ title={{SpeechBrain}: A General-Purpose Speech Toolkit},
108
+ 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},
109
+ year={2021},
110
+ eprint={2106.04624},
111
+ archivePrefix={arXiv},
112
+ primaryClass={eess.AS},
113
+ note={arXiv:2106.04624}
114
+ }
115
+ ```
116
+
117
+ # **About SpeechBrain**
118
+ - Website: https://speechbrain.github.io/
119
+ - Code: https://github.com/speechbrain/speechbrain/
120
+ - HuggingFace: https://huggingface.co/speechbrain/