franjamonga
commited on
Commit
•
6fceb40
1
Parent(s):
0feb365
Upload config
Browse files
README.md
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
license: cc-by-4.0
|
5 |
+
library_name: nemo
|
6 |
+
datasets:
|
7 |
+
- librispeech_asr
|
8 |
+
- VOXCCELEB-1
|
9 |
+
- VOXCCELEB-2
|
10 |
+
- FISHER
|
11 |
+
- Switchboard
|
12 |
+
- SRE(2004-2010)
|
13 |
+
thumbnail: null
|
14 |
+
tags:
|
15 |
+
- speaker-recognition
|
16 |
+
- speech
|
17 |
+
- audio
|
18 |
+
- speaker-verification
|
19 |
+
- titanet
|
20 |
+
- speaker-diarization
|
21 |
+
- NeMo
|
22 |
+
- pytorch
|
23 |
+
model-index:
|
24 |
+
- name: speakerverification_en
|
25 |
+
results: []
|
26 |
+
|
27 |
+
---
|
28 |
+
|
29 |
+
|
30 |
+
## Model Overview
|
31 |
+
|
32 |
+
This model extracts speaker embeddings from given speech, which is the backbone for speaker verification and diarization tasks.
|
33 |
+
It is a "large" version of TitaNet (around 23M parameters) models.
|
34 |
+
See the [model architecture](#model-architecture) section and [NeMo documentation](https://docs.nvidia.com/deeplearning/nemo/user
|
35 |
+
|
36 |
+
## How to Use this Model
|
37 |
+
|
38 |
+
The model is available for use in the NeMo toolkit [3] and can be used as a pre-trained checkpoint for inference or for fine-tuning on another dataset.
|
39 |
+
|
40 |
+
### Automatically instantiate the model
|
41 |
+
|
42 |
+
```python
|
43 |
+
import nemo.collections.asr as nemo_asr
|
44 |
+
speaker_model = nemo_asr.models.EncDecSpeakerLabelModel.from_pretrained("nvidia/speakerverification_en_titanet_large")
|
45 |
+
```
|
46 |
+
|
47 |
+
### Embedding Extraction
|
48 |
+
|
49 |
+
Using
|
50 |
+
|
51 |
+
```python
|
52 |
+
emb = speaker_model.get_embedding("an255-fash-b.wav")
|
53 |
+
```
|
54 |
+
|
55 |
+
### Verifying two utterances (Speaker Verification)
|
56 |
+
|
57 |
+
Now to check if two audio files are from the same speaker or not, simply do:
|
58 |
+
|
59 |
+
```python
|
60 |
+
speaker_model.verify_speakers("an255-fash-b.wav","cen7-fash-b.wav")
|
61 |
+
```
|
62 |
+
|
63 |
+
### Extracting Embeddings for more audio files
|
64 |
+
|
65 |
+
To extract embeddings from a bunch of audio files:
|
66 |
+
|
67 |
+
Write audio files to a `manifest.json` file with lines as in format:
|
68 |
+
|
69 |
+
```json
|
70 |
+
{"audio_filepath": "<absolute path to dataset>/audio_file.wav", "duration": "duration of file in sec", "label": "speaker_id"}
|
71 |
+
```
|
72 |
+
|
73 |
+
Then running following script will extract embeddings and writes to current working directory:
|
74 |
+
```shell
|
75 |
+
python <NeMo_root>/examples/speaker_tasks/recognition/extract_speaker_embeddings.py --manifest=manifest.json
|
76 |
+
```
|
77 |
+
|
78 |
+
### Input
|
79 |
+
|
80 |
+
This model accepts 16000 KHz Mono-channel Audio (wav files) as input.
|
81 |
+
|
82 |
+
### Output
|
83 |
+
|
84 |
+
This model provides speaker embeddings for an audio file.
|
85 |
+
|
86 |
+
## Model Architecture
|
87 |
+
|
88 |
+
TitaNet model is a depth-wise separable conv1D model [1] for Speaker Verification and diarization tasks. You may find more info on the detail of this model here: [TitaNet-Model](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/speaker_recognition/models.html).
|
89 |
+
|
90 |
+
## Training
|
91 |
+
|
92 |
+
The NeMo toolkit [3] was used for training the models for over several hundred epochs. These model are trained with this [example script](https://github.com/NVIDIA/NeMo/blob/main/examples/speaker_tasks/recognition/speaker_reco.py) and this [base config](https://github.com/NVIDIA/NeMo/blob/main/examples/speaker_tasks/recognition/conf/titanet-large.yaml).
|
93 |
+
|
94 |
+
### Datasets
|
95 |
+
|
96 |
+
All the models in this collection are trained on a composite dataset comprising several thousand hours of English speech:
|
97 |
+
|
98 |
+
- Voxceleb-1
|
99 |
+
- Voxceleb-2
|
100 |
+
- Fisher
|
101 |
+
- Switchboard
|
102 |
+
- Librispeech
|
103 |
+
- SRE (2004-2010)
|
104 |
+
|
105 |
+
|
106 |
+
## Performance
|
107 |
+
|
108 |
+
Performances of the these models are reported in terms of Equal Error Rate (EER%) on speaker verification evaluation trial files and as Diarization Error Rate (DER%) on diarization test sessions.
|
109 |
+
|
110 |
+
* Speaker Verification (EER%)
|
111 |
+
| Version | Model | Model Size | VoxCeleb1 (Cleaned trial file) |
|
112 |
+
|---------|--------------|-----|---------------|
|
113 |
+
| 1.10.0 | TitaNet-Large | 23M | 0.66 |
|
114 |
+
|
115 |
+
* Speaker Diarization (DER%)
|
116 |
+
| Version | Model | Model Size | Evaluation Condition | NIST SRE 2000 | AMI (Lapel) | AMI (MixHeadset) | CH109 |
|
117 |
+
|---------|--------------|-----|----------------------|---------------|-------------|------------------|-------|
|
118 |
+
| 1.10.0 | TitaNet-Large | 23M | Oracle VAD KNOWN # of Speakers | 6.73 | 2.03 | 1.73 | 1.19 |
|
119 |
+
| 1.10.0 | TitaNet-Large | 23M | Oracle VAD UNKNOWN # of Speakers | 5.38 | 2.03 | 1.89 | 1.63 |
|
120 |
+
|
121 |
+
## Limitations
|
122 |
+
This model is trained on both telephonic and non-telephonic speech from voxceleb datasets, Fisher and switch board. If your domain of data differs from trained data or doesnot show relatively good performance consider finetuning for that speech domain.
|
123 |
+
|
124 |
+
## NVIDIA Riva: Deployment
|
125 |
+
|
126 |
+
[NVIDIA Riva](https://developer.nvidia.com/riva), is an accelerated speech AI SDK deployable on-prem, in all clouds, multi-cloud, hybrid, on edge, and embedded.
|
127 |
+
Additionally, Riva provides:
|
128 |
+
|
129 |
+
* World-class out-of-the-box accuracy for the most common languages with model checkpoints trained on proprietary data with hundreds of thousands of GPU-compute hours
|
130 |
+
* Best in class accuracy with run-time word boosting (e.g., brand and product names) and customization of acoustic model, language model, and inverse text normalization
|
131 |
+
* Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
|
132 |
+
|
133 |
+
Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
|
134 |
+
Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
|
135 |
+
|
136 |
+
## References
|
137 |
+
[1] [TitaNet: Neural Model for Speaker Representation with 1D Depth-wise Separable convolutions and global context](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9746806)
|
138 |
+
[2] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
|
139 |
+
|
140 |
+
## Licence
|
141 |
+
|
142 |
+
License to use this model is covered by the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/). By downloading the public and release version of the model, you accept the terms and conditions of the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) license.
|
143 |
+
|