NeMo
PyTorch
Portuguese
speaker
speech
audio
speaker-verification
speaker-recognition
speaker-diarization
titanet
NeMo
Instructions to use pgwi/en_pt_titanet_large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- NeMo
How to use pgwi/en_pt_titanet_large with NeMo:
# tag did not correspond to a valid NeMo domain.
- Notebooks
- Google Colab
- Kaggle
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- pt
|
| 4 |
+
library_name: nemo
|
| 5 |
+
datasets:
|
| 6 |
+
- common-voice
|
| 7 |
+
thumbnail: null
|
| 8 |
+
tags:
|
| 9 |
+
- speaker
|
| 10 |
+
- speech
|
| 11 |
+
- audio
|
| 12 |
+
- speaker-verification
|
| 13 |
+
- speaker-recognition
|
| 14 |
+
- speaker-diarization
|
| 15 |
+
- titanet
|
| 16 |
+
- NeMo
|
| 17 |
+
- pytorch
|
| 18 |
+
license: cc-by-4.0
|
| 19 |
+
widget:
|
| 20 |
+
- src: >-
|
| 21 |
+
https://huggingface.co/nvidia/speakerverification_en_titanet_large/resolve/main/an255-fash-b.wav
|
| 22 |
+
example_title: Speech sample 1
|
| 23 |
+
- src: >-
|
| 24 |
+
https://huggingface.co/nvidia/speakerverification_en_titanet_large/resolve/main/cen7-fash-b.wav
|
| 25 |
+
example_title: Speech sample 2
|
| 26 |
+
model-index:
|
| 27 |
+
- name: en_pt_titanet_large
|
| 28 |
+
results:
|
| 29 |
+
- task:
|
| 30 |
+
name: Speaker Verification
|
| 31 |
+
type: speaker-verification
|
| 32 |
+
dataset:
|
| 33 |
+
name: common voice (turkish)
|
| 34 |
+
type: common voice
|
| 35 |
+
config: clean
|
| 36 |
+
split: test
|
| 37 |
+
args:
|
| 38 |
+
language: pt
|
| 39 |
+
metrics:
|
| 40 |
+
- name: Test EER
|
| 41 |
+
type: eer
|
| 42 |
+
value: null
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
# NVIDIA TitaNet-Large (PT)
|
| 46 |
+
|
| 47 |
+
<style>
|
| 48 |
+
img {
|
| 49 |
+
display: inline;
|
| 50 |
+
}
|
| 51 |
+
</style>
|
| 52 |
+
|
| 53 |
+
| [](#model-architecture)
|
| 54 |
+
| [](#model-architecture)
|
| 55 |
+
| [](#datasets)
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
This model extracts speaker embeddings from given speech, which is the backbone for speaker verification and diarization tasks.
|
| 59 |
+
It is a "large" version of TitaNet (around 23M parameters) models.
|
| 60 |
+
See the [model architecture](#model-architecture) section and [NeMo documentation](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/stable/asr/speaker_recognition/models.html#titanet) for complete architecture details.
|
| 61 |
+
|
| 62 |
+
## NVIDIA NeMo: Training
|
| 63 |
+
|
| 64 |
+
To train, fine-tune or play with the model you will need to install [NVIDIA NeMo](https://github.com/NVIDIA/NeMo). We recommend you install it after you've installed the latest Pytorch version.
|
| 65 |
+
```
|
| 66 |
+
pip install nemo_toolkit['all']
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## How to Use this Model
|
| 70 |
+
|
| 71 |
+
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.
|
| 72 |
+
|
| 73 |
+
### Automatically instantiate the model
|
| 74 |
+
|
| 75 |
+
```python
|
| 76 |
+
import nemo.collections.asr as nemo_asr
|
| 77 |
+
speaker_model = nemo_asr.models.EncDecSpeakerLabelModel.restore_from("./titanet_finetune_pt.nemo")
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
### Embedding Extraction
|
| 81 |
+
|
| 82 |
+
Using
|
| 83 |
+
|
| 84 |
+
```python
|
| 85 |
+
emb = speaker_model.get_embedding("an255-fash-b.wav")
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
### Verifying two utterances (Speaker Verification)
|
| 89 |
+
|
| 90 |
+
Now to check if two audio files are from the same speaker or not, simply do:
|
| 91 |
+
|
| 92 |
+
```python
|
| 93 |
+
speaker_model.verify_speakers("an255-fash-b.wav","cen7-fash-b.wav")
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
+
### Extracting Embeddings for more audio files
|
| 97 |
+
|
| 98 |
+
To extract embeddings from a bunch of audio files:
|
| 99 |
+
|
| 100 |
+
Write audio files to a `manifest.json` file with lines as in format:
|
| 101 |
+
|
| 102 |
+
```json
|
| 103 |
+
{"audio_filepath": "<absolute path to dataset>/audio_file.wav", "duration": "duration of file in sec", "label": "speaker_id"}
|
| 104 |
+
```
|
| 105 |
+
|
| 106 |
+
Then running following script will extract embeddings and writes to current working directory:
|
| 107 |
+
```shell
|
| 108 |
+
python <NeMo_root>/examples/speaker_tasks/recognition/extract_speaker_embeddings.py --manifest=manifest.json
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
### Input
|
| 112 |
+
|
| 113 |
+
This model accepts 16000 KHz Mono-channel Audio (wav files) as input.
|
| 114 |
+
|
| 115 |
+
### Output
|
| 116 |
+
|
| 117 |
+
This model provides speaker embeddings for an audio file.
|
| 118 |
+
|
| 119 |
+
## Model Architecture
|
| 120 |
+
|
| 121 |
+
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).
|
| 122 |
+
|
| 123 |
+
## Training
|
| 124 |
+
|
| 125 |
+
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).
|
| 126 |
+
|
| 127 |
+
### Datasets
|
| 128 |
+
|
| 129 |
+
All the models in this collection are trained on a composite dataset comprising several thousand hours of English speech:
|
| 130 |
+
|
| 131 |
+
- common voice (pt)
|
| 132 |
+
|
| 133 |
+
## Performance
|
| 134 |
+
|
| 135 |
+
Performances of the these models are reported in terms of Equal Error Rate (EER%) on speaker verification evaluation trial files.
|
| 136 |
+
|
| 137 |
+
* Speaker Verification (EER%)
|
| 138 |
+
| Version | Model | Model Size | Common Voice(Turkish) |
|
| 139 |
+
|---------|--------------|-----|---------------|
|
| 140 |
+
| 1.10.0 | TitaNet-Large | 23M | TODO |
|
| 141 |
+
|
| 142 |
+
## Limitations
|
| 143 |
+
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.
|
| 144 |
+
|
| 145 |
+
## NVIDIA Riva: Deployment
|
| 146 |
+
|
| 147 |
+
[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.
|
| 148 |
+
Additionally, Riva provides:
|
| 149 |
+
|
| 150 |
+
* 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
|
| 151 |
+
* 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
|
| 152 |
+
* Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
|
| 153 |
+
|
| 154 |
+
Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
|
| 155 |
+
Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
|
| 156 |
+
|
| 157 |
+
## References
|
| 158 |
+
[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)
|
| 159 |
+
[2] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
|
| 160 |
+
|
| 161 |
+
## Licence
|
| 162 |
+
|
| 163 |
+
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.
|