speechbrainteam
commited on
Commit
•
c7924ee
1
Parent(s):
9900bcf
Create README.md
Browse files
README.md
CHANGED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: "en"
|
3 |
+
thumbnail:
|
4 |
+
tags:
|
5 |
+
- embeddings
|
6 |
+
- Speaker
|
7 |
+
- Verification
|
8 |
+
- Identification
|
9 |
+
- pytorch
|
10 |
+
- ECAPA
|
11 |
+
- TDMM
|
12 |
+
license: "apache-2.0"
|
13 |
+
datasets:
|
14 |
+
- voxceleb
|
15 |
+
metrics:
|
16 |
+
- EER
|
17 |
+
- min_dct
|
18 |
+
---
|
19 |
+
|
20 |
+
# Speaker Verification with ECAPA-TDNN embeddings on Voxceleb
|
21 |
+
|
22 |
+
This repository provides all the necessary tools to perform speaker verification with a pretrained ECAPA-TDNN model using SpeechBrain.
|
23 |
+
The system can be used to extract speaker embeddings as well.
|
24 |
+
It is trained on Voxceleb 1+ Voxceleb2 training data.
|
25 |
+
|
26 |
+
For a better experience, we encourage you to learn more about
|
27 |
+
[SpeechBrain](https://speechbrain.github.io). The given ASR model performance on Voxceleb1-test set are:
|
28 |
+
|
29 |
+
| Release | EER(%) | minDCF |
|
30 |
+
|:-------------:|:--------------:|:--------------:|
|
31 |
+
| 05-03-21 | 0.69 | 0.08258 |
|
32 |
+
|
33 |
+
|
34 |
+
## Pipeline description
|
35 |
+
|
36 |
+
This ASR 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. Speaker Verification is performed using cosine distance between speaker embeddings.
|
37 |
+
|
38 |
+
## Install SpeechBrain
|
39 |
+
|
40 |
+
First of all, please install SpeechBrain with the following command:
|
41 |
+
|
42 |
+
```
|
43 |
+
pip install \\we hide ! SpeechBrain is still private :p
|
44 |
+
```
|
45 |
+
|
46 |
+
Please notice that we encourage you to read our tutorials and learn more about
|
47 |
+
[SpeechBrain](https://speechbrain.github.io).
|
48 |
+
|
49 |
+
### Compute your speaker embeddings
|
50 |
+
|
51 |
+
```python
|
52 |
+
import torchaudio
|
53 |
+
from speechbrain.pretrained import SpeakerRecognition
|
54 |
+
verification = SpeakerRecognition.from_hparams(source="speechbrain/spkrec-ecapa-voxceleb")
|
55 |
+
signal, fs =torchaudio.load('samples/audio_samples/example1.wav')
|
56 |
+
embeddings = verification.encode(signal)
|
57 |
+
```
|
58 |
+
|
59 |
+
### Perform Speaker Verification
|
60 |
+
|
61 |
+
```python
|
62 |
+
import torchaudio
|
63 |
+
from speechbrain.pretrained import SpeakerRecognition
|
64 |
+
verification = SpeakerRecognition.from_hparams(source="speechbrain/spkrec-ecapa-voxceleb")
|
65 |
+
signal, fs =torchaudio.load('samples/audio_samples/example1.wav')
|
66 |
+
signal2, fs = torchaudio.load('samples/audio_samples/example2.flac')
|
67 |
+
score, prediction = verification.verify(signal, signal2)
|
68 |
+
```
|
69 |
+
The prediction is 1 if the two signals in input are from the same speaker and 0 otherwise.
|
70 |
+
|
71 |
+
#### Referencing ECAPA-TDNN
|
72 |
+
```
|
73 |
+
@inproceedings{DBLP:conf/interspeech/DesplanquesTD20,
|
74 |
+
author = {Brecht Desplanques and
|
75 |
+
Jenthe Thienpondt and
|
76 |
+
Kris Demuynck},
|
77 |
+
editor = {Helen Meng and
|
78 |
+
Bo Xu and
|
79 |
+
Thomas Fang Zheng},
|
80 |
+
title = {{ECAPA-TDNN:} Emphasized Channel Attention, Propagation and Aggregation
|
81 |
+
in {TDNN} Based Speaker Verification},
|
82 |
+
booktitle = {Interspeech 2020},
|
83 |
+
pages = {3830--3834},
|
84 |
+
publisher = {{ISCA}},
|
85 |
+
year = {2020},
|
86 |
+
}
|
87 |
+
```
|
88 |
+
|
89 |
+
|
90 |
+
#### Referencing SpeechBrain
|
91 |
+
|
92 |
+
```
|
93 |
+
@misc{SB2021,
|
94 |
+
author = {Ravanelli, Mirco and Parcollet, Titouan and Rouhe, Aku and Plantinga, Peter and Rastorgueva, Elena and Lugosch, Loren and Dawalatabad, Nauman and Ju-Chieh, Chou and Heba, Abdel and Grondin, Francois and Aris, William and Liao, Chien-Feng and Cornell, Samuele and Yeh, Sung-Lin and Na, Hwidong and Gao, Yan and Fu, Szu-Wei and Subakan, Cem and De Mori, Renato and Bengio, Yoshua },
|
95 |
+
title = {SpeechBrain},
|
96 |
+
year = {2021},
|
97 |
+
publisher = {GitHub},
|
98 |
+
journal = {GitHub repository},
|
99 |
+
howpublished = {\url{https://github.com/speechbrain/speechbrain}},
|
100 |
+
}
|
101 |
+
```
|