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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- es
|
4 |
+
library_name: nemo
|
5 |
+
datasets:
|
6 |
+
- Fisher-(Spanish)
|
7 |
+
- VoxPopuli-(Spanish)
|
8 |
+
- facebook/multilingual_librispeech
|
9 |
+
- mozilla-foundation/common_voice_12_0
|
10 |
+
thumbnail: null
|
11 |
+
tags:
|
12 |
+
- automatic-speech-recognition
|
13 |
+
- speech
|
14 |
+
- audio
|
15 |
+
- Transducer
|
16 |
+
- FastConformer
|
17 |
+
- CTC
|
18 |
+
- Transformer
|
19 |
+
- pytorch
|
20 |
+
- NeMo
|
21 |
+
- hf-asr-leaderboard
|
22 |
license: cc-by-4.0
|
23 |
+
model-index:
|
24 |
+
- name: stt_es_fastconformer_hybrid_large_pc
|
25 |
+
results:
|
26 |
+
|
27 |
+
- task:
|
28 |
+
name: Automatic Speech Recognition
|
29 |
+
type: automatic-speech-recognition
|
30 |
+
dataset:
|
31 |
+
name: Fisher
|
32 |
+
type: Spanish
|
33 |
+
config: es
|
34 |
+
split: test
|
35 |
+
args:
|
36 |
+
language: es
|
37 |
+
metrics:
|
38 |
+
- name: Test WER
|
39 |
+
type: wer
|
40 |
+
value: 14.65
|
41 |
+
- task:
|
42 |
+
name: Automatic Speech Recognition
|
43 |
+
type: automatic-speech-recognition
|
44 |
+
dataset:
|
45 |
+
name: common-voice-12-0
|
46 |
+
type: mozilla-foundation/common_voice_12_0
|
47 |
+
config: es
|
48 |
+
split: test
|
49 |
+
args:
|
50 |
+
language: es
|
51 |
+
metrics:
|
52 |
+
- name: Test WER
|
53 |
+
type: wer
|
54 |
+
value: 5.00
|
55 |
+
- task:
|
56 |
+
type: Automatic Speech Recognition
|
57 |
+
name: automatic-speech-recognition
|
58 |
+
dataset:
|
59 |
+
name: Multilingual LibriSpeech
|
60 |
+
type: facebook/multilingual_librispeech
|
61 |
+
config: spanish
|
62 |
+
split: test
|
63 |
+
args:
|
64 |
+
language: es
|
65 |
+
metrics:
|
66 |
+
- name: Test WER
|
67 |
+
type: wer
|
68 |
+
value: 3.90
|
69 |
+
- task:
|
70 |
+
type: Automatic Speech Recognition
|
71 |
+
name: automatic-speech-recognition
|
72 |
+
dataset:
|
73 |
+
name: Vox Populi
|
74 |
+
type: polinaeterna/voxpopuli
|
75 |
+
config: spanish
|
76 |
+
split: test
|
77 |
+
args:
|
78 |
+
language: es
|
79 |
+
metrics:
|
80 |
+
- name: Test WER
|
81 |
+
type: wer
|
82 |
+
value: 5.59
|
83 |
+
- task:
|
84 |
+
name: Automatic Speech Recognition
|
85 |
+
type: automatic-speech-recognition
|
86 |
+
dataset:
|
87 |
+
name: Fisher
|
88 |
+
type: Spanish
|
89 |
+
config: spanish P&C
|
90 |
+
split: test
|
91 |
+
args:
|
92 |
+
language: es
|
93 |
+
metrics:
|
94 |
+
- name: Test WER P&C
|
95 |
+
type: wer
|
96 |
+
value: 28.91
|
97 |
+
- task:
|
98 |
+
name: Automatic Speech Recognition
|
99 |
+
type: automatic-speech-recognition
|
100 |
+
dataset:
|
101 |
+
name: common-voice-12-0
|
102 |
+
type: mozilla-foundation/common_voice_12_0
|
103 |
+
config: Spanish P&C
|
104 |
+
split: test
|
105 |
+
args:
|
106 |
+
language: es
|
107 |
+
metrics:
|
108 |
+
- name: Test WER
|
109 |
+
type: wer
|
110 |
+
value: 7.51
|
111 |
+
- task:
|
112 |
+
type: Automatic Speech Recognition
|
113 |
+
name: automatic-speech-recognition
|
114 |
+
dataset:
|
115 |
+
name: Multilingual LibriSpeech
|
116 |
+
type: facebook/multilingual_librispeech
|
117 |
+
config: Spanish P&C
|
118 |
+
split: test
|
119 |
+
args:
|
120 |
+
language: es
|
121 |
+
metrics:
|
122 |
+
- name: Test WER
|
123 |
+
type: wer
|
124 |
+
value: 11.84
|
125 |
+
- task:
|
126 |
+
type: Automatic Speech Recognition
|
127 |
+
name: automatic-speech-recognition
|
128 |
+
dataset:
|
129 |
+
name: Vox Populi
|
130 |
+
type: polinaeterna/voxpopuli
|
131 |
+
config: Spanish P&C
|
132 |
+
split: test
|
133 |
+
args:
|
134 |
+
language: es
|
135 |
+
metrics:
|
136 |
+
- name: Test WER
|
137 |
+
type: wer
|
138 |
+
value: 9.79
|
139 |
+
|
140 |
---
|
141 |
+
|
142 |
+
# NVIDIA FastConformer-Hybrid Large (es)
|
143 |
+
|
144 |
+
<style>
|
145 |
+
img {
|
146 |
+
display: inline;
|
147 |
+
}
|
148 |
+
</style>
|
149 |
+
|
150 |
+
| [![Model architecture](https://img.shields.io/badge/Model_Arch-FastConformer--Transducer_CTC-lightgrey#model-badge)](#model-architecture)
|
151 |
+
| [![Model size](https://img.shields.io/badge/Params-115M-lightgrey#model-badge)](#model-architecture)
|
152 |
+
| [![Language](https://img.shields.io/badge/Language-es-lightgrey#model-badge)](#datasets)
|
153 |
+
|
154 |
+
|
155 |
+
This model transcribes speech in upper and lower case Spanish alphabet along with spaces, periods, commas, and question marks (inverted and non-inverted).
|
156 |
+
It is a "large" version of FastConformer Transducer-CTC (around 115M parameters) model. This is a hybrid model trained on two losses: Transducer (default) and CTC.
|
157 |
+
See the [model architecture](#model-architecture) section and [NeMo documentation](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/models.html#fast-conformer) for complete architecture details.
|
158 |
+
|
159 |
+
## NVIDIA NeMo: Training
|
160 |
+
|
161 |
+
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 latest Pytorch version.
|
162 |
+
```
|
163 |
+
pip install nemo_toolkit['all']
|
164 |
+
```
|
165 |
+
|
166 |
+
## How to Use this Model
|
167 |
+
|
168 |
+
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.
|
169 |
+
|
170 |
+
### Automatically instantiate the model
|
171 |
+
|
172 |
+
```python
|
173 |
+
import nemo.collections.asr as nemo_asr
|
174 |
+
asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="nvidia/stt_es_fastconformer_hybrid_large_pc")
|
175 |
+
```
|
176 |
+
|
177 |
+
### Transcribing using Python
|
178 |
+
First, let's get a sample
|
179 |
+
```
|
180 |
+
wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
|
181 |
+
```
|
182 |
+
Then simply do:
|
183 |
+
```
|
184 |
+
asr_model.transcribe(['2086-149220-0033.wav'])
|
185 |
+
```
|
186 |
+
|
187 |
+
### Transcribing many audio files
|
188 |
+
|
189 |
+
Using Transducer mode inference:
|
190 |
+
```shell
|
191 |
+
python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
|
192 |
+
pretrained_name="nvidia/stt_es_fastconformer_hybrid_large_pc"
|
193 |
+
audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
|
194 |
+
```
|
195 |
+
|
196 |
+
Using CTC mode inference:
|
197 |
+
```shell
|
198 |
+
python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
|
199 |
+
pretrained_name="nvidia/stt_es_fastconformer_hybrid_large_pc"
|
200 |
+
audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
|
201 |
+
decoder_type="ctc"
|
202 |
+
```
|
203 |
+
|
204 |
+
### Input
|
205 |
+
|
206 |
+
This model accepts 16000 Hz Mono-channel Audio (wav files) as input.
|
207 |
+
|
208 |
+
### Output
|
209 |
+
|
210 |
+
This model provides transcribed speech as a string for a given audio sample.
|
211 |
+
|
212 |
+
## Model Architecture
|
213 |
+
|
214 |
+
FastConformer is an optimized version of the Conformer model [1] with 8x depthwise-separable convolutional downsampling. The model is trained in a multitask setup with joint Transducer and CTC decoder loss. You may find more information on the details of FastConformer here: [Fast-Conformer Model](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/models.html#fast-conformer) and about Hybrid Transducer-CTC training here: [Hybrid Transducer-CTC](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/models.html#hybrid-transducer-ctc).
|
215 |
+
|
216 |
+
## Training
|
217 |
+
|
218 |
+
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/asr/asr_hybrid_transducer_ctc/speech_to_text_hybrid_rnnt_ctc_bpe.py) and this [base config](https://github.com/NVIDIA/NeMo/blob/main/examples/asr/conf/fastconformer/hybrid_transducer_ctc/fastconformer_hybrid_transducer_ctc_bpe.yaml).
|
219 |
+
|
220 |
+
The tokenizers for these models were built using the text transcripts of the train set with this [script](https://github.com/NVIDIA/NeMo/blob/main/scripts/tokenizers/process_asr_text_tokenizer.py).
|
221 |
+
|
222 |
+
### Datasets
|
223 |
+
|
224 |
+
The model in this collection are trained on a composite dataset (NeMo PnC ES ASRSET) comprising of 1424 thousand hours of Spanish speech:
|
225 |
+
|
226 |
+
- Fisher (141 hrs)
|
227 |
+
- MCV12 (395 hrs)
|
228 |
+
- MLS (780 hrs)
|
229 |
+
- Voxpopuli (108 hrs)
|
230 |
+
|
231 |
+
## Performance
|
232 |
+
|
233 |
+
The performance of Automatic Speech Recognition models is measuring using Word Error Rate. Since this dataset is trained on multiple domains and a much larger corpus, it will generally perform better at transcribing audio in general.
|
234 |
+
|
235 |
+
The following tables summarizes the performance of the available models in this collection with the Transducer decoder. Performances of the ASR models are reported in terms of Word Error Rate (WER%) with greedy decoding.
|
236 |
+
|
237 |
+
|
238 |
+
a) On data without Punctuation and Capitalization with Transducer decoder
|
239 |
+
|
240 |
+
|
241 |
+
| Version | Tokenizer | Vocabulary Size | Fisher dev | Fisher test | MCV12 dev | MCV12 test | MLS dev | MLS test | Voxpopuli dev | Voxpopuli test |
|
242 |
+
|---------|----------------------|-----------------|------------|-------------|-----------|------------|---------|----------|---------------|----------------|
|
243 |
+
| 1.18.0 | SentencePiece Unigram | 1024 | 15.14% | 15.01% | 4.43% | 4.99% | 3.06% | 3.76% | 4.62% | 5.72% |
|
244 |
+
|
245 |
+
|
246 |
+
|
247 |
+
b) On data with Punctuation and Capitalization with Transducer decoder
|
248 |
+
|
249 |
+
| Version | Tokenizer | Vocabulary Size | Fisher dev | Fisher test | MCV12 dev | MCV12 test | MLS dev | MLS test | Voxpopuli dev | Voxpopuli test |
|
250 |
+
|---------|----------------------| ----------------|------------|-------------|-----------|------------|---------|----------|---------------|----------------|
|
251 |
+
| 1.18.0 | SentencePiece Unigram | 1024 | 29.44% | 28.91% | 7.13% | 7.51% | 10.58% | 11.84% | 8.58% | 9.79% |
|
252 |
+
|
253 |
+
## Limitations
|
254 |
+
Since this model was trained on publically available speech datasets, the performance of this model might degrade for speech which includes technical terms, or vernacular that the model has not been trained on. The model might also perform worse for accented speech. The model only outputs the punctuations: ```'.', ',', '¿', '?' ``` and hence might not do well in scenarios where other punctuations are also expected.
|
255 |
+
|
256 |
+
## NVIDIA Riva: Deployment
|
257 |
+
|
258 |
+
[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.
|
259 |
+
Additionally, Riva provides:
|
260 |
+
|
261 |
+
* 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
|
262 |
+
* 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
|
263 |
+
* Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
|
264 |
+
|
265 |
+
Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
|
266 |
+
Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
|
267 |
+
|
268 |
+
## References
|
269 |
+
[1] [Conformer: Convolution-augmented Transformer for Speech Recognition](https://arxiv.org/abs/2005.08100)
|
270 |
+
|
271 |
+
[2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
|
272 |
+
|
273 |
+
[3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
|
274 |
+
|
275 |
+
## Licence
|
276 |
+
|
277 |
+
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.
|