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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: nemo
|
5 |
+
datasets:
|
6 |
+
- librispeech_asr
|
7 |
+
- fisher_corpus
|
8 |
+
- Switchboard-1
|
9 |
+
- WSJ-0
|
10 |
+
- WSJ-1
|
11 |
+
- National-Singapore-Corpus-Part-1
|
12 |
+
- National-Singapore-Corpus-Part-6
|
13 |
+
- vctk
|
14 |
+
- VoxPopuli-(EN)
|
15 |
+
- Europarl-ASR-(EN)
|
16 |
+
- Multilingual-LibriSpeech-(2000-hours)
|
17 |
+
- mozilla-foundation/common_voice_8_0
|
18 |
+
- MLCommons/peoples_speech
|
19 |
+
thumbnail: null
|
20 |
+
tags:
|
21 |
+
- automatic-speech-recognition
|
22 |
+
- speech
|
23 |
+
- audio
|
24 |
+
- CTC
|
25 |
+
- FastConformer
|
26 |
+
- Transformer
|
27 |
+
- pytorch
|
28 |
+
- NeMo
|
29 |
+
- hf-asr-leaderboard
|
30 |
license: cc-by-4.0
|
31 |
+
widget:
|
32 |
+
- example_title: Librispeech sample 1
|
33 |
+
src: https://cdn-media.huggingface.co/speech_samples/sample1.flac
|
34 |
+
- example_title: Librispeech sample 2
|
35 |
+
src: https://cdn-media.huggingface.co/speech_samples/sample2.flac
|
36 |
+
model-index:
|
37 |
+
- name: stt_en_fastconformer_transducer_large
|
38 |
+
results:
|
39 |
+
- task:
|
40 |
+
name: Automatic Speech Recognition
|
41 |
+
type: automatic-speech-recognition
|
42 |
+
dataset:
|
43 |
+
name: LibriSpeech (clean)
|
44 |
+
type: librispeech_asr
|
45 |
+
config: clean
|
46 |
+
split: test
|
47 |
+
args:
|
48 |
+
language: en
|
49 |
+
metrics:
|
50 |
+
- name: Test WER
|
51 |
+
type: wer
|
52 |
+
value: 2.1
|
53 |
+
- task:
|
54 |
+
name: Automatic Speech Recognition
|
55 |
+
type: automatic-speech-recognition
|
56 |
+
dataset:
|
57 |
+
name: LibriSpeech (other)
|
58 |
+
type: librispeech_asr
|
59 |
+
config: other
|
60 |
+
split: test
|
61 |
+
args:
|
62 |
+
language: en
|
63 |
+
metrics:
|
64 |
+
- name: Test WER
|
65 |
+
type: wer
|
66 |
+
value: 4.2
|
67 |
+
- task:
|
68 |
+
type: Automatic Speech Recognition
|
69 |
+
name: automatic-speech-recognition
|
70 |
+
dataset:
|
71 |
+
name: Multilingual LibriSpeech
|
72 |
+
type: facebook/multilingual_librispeech
|
73 |
+
config: english
|
74 |
+
split: test
|
75 |
+
args:
|
76 |
+
language: en
|
77 |
+
metrics:
|
78 |
+
- name: Test WER
|
79 |
+
type: wer
|
80 |
+
value: 6.4
|
81 |
+
- task:
|
82 |
+
type: Automatic Speech Recognition
|
83 |
+
name: automatic-speech-recognition
|
84 |
+
dataset:
|
85 |
+
name: Mozilla Common Voice 7.0
|
86 |
+
type: mozilla-foundation/common_voice_7_0
|
87 |
+
config: en
|
88 |
+
split: test
|
89 |
+
args:
|
90 |
+
language: en
|
91 |
+
metrics:
|
92 |
+
- name: Test WER
|
93 |
+
type: wer
|
94 |
+
value: 8.3
|
95 |
+
- task:
|
96 |
+
type: Automatic Speech Recognition
|
97 |
+
name: automatic-speech-recognition
|
98 |
+
dataset:
|
99 |
+
name: Wall Street Journal 92
|
100 |
+
type: wsj_0
|
101 |
+
args:
|
102 |
+
language: en
|
103 |
+
metrics:
|
104 |
+
- name: Test WER
|
105 |
+
type: wer
|
106 |
+
value: 1.6
|
107 |
+
- task:
|
108 |
+
type: Automatic Speech Recognition
|
109 |
+
name: automatic-speech-recognition
|
110 |
+
dataset:
|
111 |
+
name: Wall Street Journal 93
|
112 |
+
type: wsj_1
|
113 |
+
args:
|
114 |
+
language: en
|
115 |
+
metrics:
|
116 |
+
- name: Test WER
|
117 |
+
type: wer
|
118 |
+
value: 2.5
|
119 |
+
- task:
|
120 |
+
name: Automatic Speech Recognition
|
121 |
+
type: automatic-speech-recognition
|
122 |
+
dataset:
|
123 |
+
name: National Singapore Corpus
|
124 |
+
type: nsc_part_1
|
125 |
+
split: test
|
126 |
+
args:
|
127 |
+
language: en
|
128 |
+
metrics:
|
129 |
+
- name: Test WER
|
130 |
+
type: wer
|
131 |
+
value: 6.3
|
132 |
+
|
133 |
+
|
134 |
---
|
135 |
+
|
136 |
+
# NVIDIA FastConformer-Hybrid Large (en)
|
137 |
+
|
138 |
+
<style>
|
139 |
+
img {
|
140 |
+
display: inline;
|
141 |
+
}
|
142 |
+
</style>
|
143 |
+
|
144 |
+
| [![Model architecture](https://img.shields.io/badge/Model_Arch-FastConformer-lightgrey#model-badge)](#model-architecture)
|
145 |
+
| [![Model size](https://img.shields.io/badge/Params-115M-lightgrey#model-badge)](#model-architecture)
|
146 |
+
| [![Language](https://img.shields.io/badge/Language-en-lightgrey#model-badge)](#datasets)
|
147 |
+
|
148 |
+
|
149 |
+
This model transcribes speech in lower case English alphabet.
|
150 |
+
It is a "large" version of FastConformer CTC (around 115M parameters) model.
|
151 |
+
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.
|
152 |
+
|
153 |
+
## NVIDIA NeMo: Training
|
154 |
+
|
155 |
+
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.
|
156 |
+
```
|
157 |
+
pip install nemo_toolkit['all']
|
158 |
+
```
|
159 |
+
|
160 |
+
## How to Use this Model
|
161 |
+
|
162 |
+
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.
|
163 |
+
|
164 |
+
### Automatically instantiate the model
|
165 |
+
|
166 |
+
```python
|
167 |
+
import nemo.collections.asr as nemo_asr
|
168 |
+
asr_model = nemo_asr.models.EncDecCTCTBPEModel.from_pretrained(model_name="nvidia/stt_en_fastconformer_ctc_large")
|
169 |
+
```
|
170 |
+
|
171 |
+
### Transcribing using Python
|
172 |
+
First, let's get a sample
|
173 |
+
```
|
174 |
+
wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
|
175 |
+
```
|
176 |
+
Then simply do:
|
177 |
+
```
|
178 |
+
asr_model.transcribe(['2086-149220-0033.wav'])
|
179 |
+
```
|
180 |
+
|
181 |
+
### Transcribing many audio files
|
182 |
+
|
183 |
+
```shell
|
184 |
+
python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
|
185 |
+
pretrained_name="nvidia/stt_en_fastconformer_ctc_large"
|
186 |
+
audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
|
187 |
+
```
|
188 |
+
|
189 |
+
### Input
|
190 |
+
|
191 |
+
This model accepts 16000 Hz Mono-channel Audio (wav files) as input.
|
192 |
+
|
193 |
+
### Output
|
194 |
+
|
195 |
+
This model provides transcribed speech as a string for a given audio sample.
|
196 |
+
|
197 |
+
## Model Architecture
|
198 |
+
|
199 |
+
FastConformer [1] is an optimized version of the Conformer model with 8x depthwise-separable convolutional downsampling. The model is trained in a multitask setup with a Transducer 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).
|
200 |
+
|
201 |
+
## Training
|
202 |
+
|
203 |
+
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_ctc/speech_to_text_ctc_bpe.py) and this [base config](https://github.com/NVIDIA/NeMo/blob/main/examples/asr/conf/fastconformer/fast-conformer_ctc_bpe.yaml).
|
204 |
+
|
205 |
+
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).
|
206 |
+
|
207 |
+
### Datasets
|
208 |
+
|
209 |
+
The model in this collection is trained on a composite dataset (NeMo ASRSet En PC) comprising several thousand hours of English speech:
|
210 |
+
|
211 |
+
- Librispeech 960 hours of English speech
|
212 |
+
- Fisher Corpus
|
213 |
+
- Switchboard-1 Dataset
|
214 |
+
- WSJ-0 and WSJ-1
|
215 |
+
- National Speech Corpus (Part 1, Part 6)
|
216 |
+
- VCTK
|
217 |
+
- VoxPopuli (EN)
|
218 |
+
- Europarl-ASR (EN)
|
219 |
+
- Multilingual Librispeech (MLS EN) - 2,000 hrs subset
|
220 |
+
- Mozilla Common Voice (v7.0)
|
221 |
+
- People's Speech - 12,000 hrs subset
|
222 |
+
|
223 |
+
## Performance
|
224 |
+
|
225 |
+
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.
|
226 |
+
|
227 |
+
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.
|
228 |
+
|
229 |
+
|**Version**|**Tokenizer**|**Vocabulary Size**|**LS test-other**|**LS test-clean**|**WSJ Eval92**|**WSJ Dev93**|**NSC Part 1**|**MLS Test**|**MCV Test 7.0**| Train Dataset |
|
230 |
+
|---------|-----------------------|-----------------|---------------|---------------|------------|-----------|-----|-------|------|------|
|
231 |
+
| 1.18.0 | SentencePiece Unigram | 1024 | 4.2 | 2.1 | 1.6 | 2.5 | 6.3 | 6.4 | 8.3 | NeMo ASRSET 3.0 |
|
232 |
+
|
233 |
+
|
234 |
+
## Limitations
|
235 |
+
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.
|
236 |
+
|
237 |
+
## NVIDIA Riva: Deployment
|
238 |
+
|
239 |
+
[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.
|
240 |
+
Additionally, Riva provides:
|
241 |
+
|
242 |
+
* 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
|
243 |
+
* 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
|
244 |
+
* Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
|
245 |
+
|
246 |
+
Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
|
247 |
+
Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
|
248 |
+
|
249 |
+
## References
|
250 |
+
[1] [Fast Conformer with Linearly Scalable Attention for Efficient Speech Recognition](https://arxiv.org/abs/2305.05084)
|
251 |
+
|
252 |
+
[2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
|
253 |
+
|
254 |
+
[3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
|
255 |
+
|
256 |
+
## Licence
|
257 |
+
|
258 |
+
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.
|