nithinraok commited on
Commit
78d428f
1 Parent(s): 8f7e865

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +260 -0
README.md CHANGED
@@ -1,3 +1,263 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_7_0
18
+ thumbnail: null
19
+ tags:
20
+ - automatic-speech-recognition
21
+ - speech
22
+ - audio
23
+ - CTC
24
+ - Conformer
25
+ - Transformer
26
+ - pytorch
27
+ - NeMo
28
+ - hf-asr-leaderboard
29
+ - Riva
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_conformer_ctc_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: 3.7
53
+ - task:
54
+ type: Automatic Speech Recognition
55
+ name: 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: 8.1
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: 11.3
81
+ - task:
82
+ type: Automatic Speech Recognition
83
+ name: automatic-speech-recognition
84
+ dataset:
85
+ name: Mozilla Common Voice 6.1
86
+ type: mozilla-foundation/common_voice_6_1
87
+ config: en
88
+ split: test
89
+ args:
90
+ language: en
91
+ metrics:
92
+ - name: Test WER
93
+ type: wer
94
+ value: 15.7
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: 3.3
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: 4.8
119
+ - task:
120
+ type: Automatic Speech Recognition
121
+ name: automatic-speech-recognition
122
+ dataset:
123
+ name: National Singapore Corpus
124
+ type: nsc_part_1
125
+ args:
126
+ language: en
127
+ metrics:
128
+ - name: Test WER
129
+ type: wer
130
+ value: 6.9
131
  ---
132
+
133
+ # NVIDIA Conformer-CTC Small (en-US)
134
+
135
+ <style>
136
+ img {
137
+ display: inline;
138
+ }
139
+ </style>
140
+
141
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-Conformer--CTC-lightgrey#model-badge)](#model-architecture)
142
+ | [![Model size](https://img.shields.io/badge/Params-13M-lightgrey#model-badge)](#model-architecture)
143
+ | [![Language](https://img.shields.io/badge/Language-en--US-lightgrey#model-badge)](#datasets)
144
+ | [![Riva Compatible](https://img.shields.io/badge/NVIDIA%20Riva-compatible-brightgreen#model-badge)](#deployment-with-nvidia-riva) |
145
+
146
+
147
+ This model transcribes speech in lowercase English alphabet including spaces and apostrophes, and is trained on several thousand hours of English speech data.
148
+ It is a non-autoregressive "small" variant of Conformer, with around 13 million parameters.
149
+ See the [model architecture](#model-architecture) section and [NeMo documentation](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/models.html#conformer-ctc) for complete architecture details.
150
+ It is also compatible with NVIDIA Riva for [production-grade server deployments](#deployment-with-nvidia-riva).
151
+
152
+
153
+ ## Usage
154
+
155
+ 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.
156
+
157
+ 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.
158
+
159
+ ```
160
+ pip install nemo_toolkit['all']
161
+ ```
162
+
163
+ ### Automatically instantiate the model
164
+
165
+ ```python
166
+ import nemo.collections.asr as nemo_asr
167
+ asr_model = nemo_asr.models.EncDecCTCModelBPE.from_pretrained("nvidia/stt_en_conformer_ctc_small")
168
+ ```
169
+
170
+ ### Transcribing using Python
171
+ First, let's get a sample
172
+ ```
173
+ wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
174
+ ```
175
+ Then simply do:
176
+ ```
177
+ asr_model.transcribe(['2086-149220-0033.wav'])
178
+ ```
179
+
180
+ ### Transcribing many audio files
181
+
182
+ ```shell
183
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
184
+ pretrained_name="nvidia/stt_en_conformer_ctc_small"
185
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
186
+ ```
187
+
188
+ ### Input
189
+
190
+ This model accepts 16000 kHz Mono-channel Audio (wav files) as input.
191
+
192
+ ### Output
193
+
194
+ This model provides transcribed speech as a string for a given audio sample.
195
+
196
+ ## Model Architecture
197
+
198
+ Conformer-CTC model is a non-autoregressive variant of Conformer model [1] for Automatic Speech Recognition which uses CTC loss/decoding instead of Transducer. You may find more info on the detail of this model here: [Conformer-CTC Model](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/models.html#conformer-ctc).
199
+
200
+ ## Training
201
+
202
+ 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/conformer/conformer_ctc_bpe.yaml).
203
+
204
+ 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).
205
+
206
+ The checkpoint of the language model used as the neural rescorer can be found [here](https://ngc.nvidia.com/catalog/models/nvidia:nemo:asrlm_en_transformer_large_ls). You may find more info on how to train and use language models for ASR models here: [ASR Language Modeling](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/asr_language_modeling.html)
207
+
208
+ ### Datasets
209
+
210
+ All the models in this collection are trained on a composite dataset (NeMo ASRSET) comprising of several thousand hours of English speech:
211
+
212
+ - Librispeech 960 hours of English speech
213
+ - Fisher Corpus
214
+ - Switchboard-1 Dataset
215
+ - WSJ-0 and WSJ-1
216
+ - National Speech Corpus (Part 1, Part 6)
217
+ - VCTK
218
+ - VoxPopuli (EN)
219
+ - Europarl-ASR (EN)
220
+ - Multilingual Librispeech (MLS EN) - 2,000 hours subset
221
+ - Mozilla Common Voice (v7.0)
222
+
223
+ Note: older versions of the model may have trained on smaller set of datasets.
224
+
225
+ ## Performance
226
+
227
+ The list of the available models in this collection is shown in the following table. 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 | MLS Dev | MCV Test 6.1 |Train Dataset |
230
+ |---------|-----------------------|-----------------|---------------|---------------|------------|-----------|-------|------|-----|-------|---------|
231
+ | 1.6.0 | SentencePiece Unigram | 128 | 8.1 | 3.7 | 3.3 | 4.8 | 6.9 | 11.3 | 10.1 | 15.7 | NeMo ASRSET 2.0 |
232
+
233
+ While deploying with [NVIDIA Riva](https://developer.nvidia.com/riva), you can combine this model with external language models to further improve WER. The WER(%) of the latest model with different language modeling techniques are reported in the following table.
234
+
235
+ | Language Modeling | Training Dataset | LS test-other | LS test-clean | Comment |
236
+ |-------------------------------------|-------------------------|---------------|---------------|---------------------------------------------------------|
237
+ |N-gram LM | LS Train + LS LM Corpus | 6.0 | 2.6 | N=10, beam_width=128, n_gram_alpha=1.0, n_gram_beta=1.0 |
238
+ |Neural Rescorer(Transformer) | LS Train + LS LM Corpus | 6.0 | 2.4 | N=10, beam_width=128 |
239
+ |N-gram + Neural Rescorer(Transformer)| LS Train + LS LM Corpus | 5.2 | 2.2 | N=10, beam_width=128, n_gram_alpha=1.0, n_gram_beta=1.0 |
240
+
241
+
242
+ ## Limitations
243
+
244
+ Since this model was trained on publicly 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.
245
+
246
+ ## Deployment with NVIDIA Riva
247
+
248
+ For the best real-time accuracy, latency, and throughput, deploy the model with [NVIDIA Riva](https://developer.nvidia.com/riva), an accelerated speech AI SDK deployable on-prem, in all clouds, multi-cloud, hybrid, at the edge, and embedded.
249
+ Additionally, Riva provides:
250
+
251
+ * 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
252
+ * 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
253
+ * Streaming speech recognition, Kubernetes compatible scaling, and Enterprise-grade support
254
+
255
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
256
+
257
+ ## References
258
+
259
+ - [1] [Conformer: Convolution-augmented Transformer for Speech Recognition](https://arxiv.org/abs/2005.08100)
260
+
261
+ - [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
262
+
263
+ - [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)