jbalam-nv commited on
Commit
0263640
·
1 Parent(s): c73671d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +206 -0
README.md CHANGED
@@ -1,3 +1,209 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
1
  ---
2
+ language:
3
+ - fr
4
+ library_name: nemo
5
+ datasets:
6
+ - multilingual_librispeech
7
+ - mozilla-foundation/common_voice_7_0
8
+ - VoxPopuli
9
+ thumbnail: null
10
+ tags:
11
+ - automatic-speech-recognition
12
+ - speech
13
+ - audio
14
+ - CTC
15
+ - Conformer
16
+ - Transformer
17
+ - pytorch
18
+ - NeMo
19
+ - hf-asr-leaderboard
20
+ - Riva
21
  license: cc-by-4.0
22
+ model-index:
23
+ - name: stt_fr_conformer_ctc_large
24
+ results:
25
+ - task:
26
+ name: Automatic Speech Recognition
27
+ type: automatic-speech-recognition
28
+ dataset:
29
+ name: MCV 7.0
30
+ type: mozilla-foundation/common_voice_7_0
31
+ split: dev
32
+ args:
33
+ language: fr
34
+ metrics:
35
+ - name: Dev WER
36
+ type: wer
37
+ value: 8.35
38
+ - task:
39
+ name: Automatic Speech Recognition
40
+ type: automatic-speech-recognition
41
+ dataset:
42
+ name: MCV 7.0
43
+ type: mozilla-foundation/common_voice_7_0
44
+ split: test
45
+ args:
46
+ language: fr
47
+ metrics:
48
+ - name: Dev WER
49
+ type: wer
50
+ value: 9.63
51
+ - task:
52
+ type: Automatic Speech Recognition
53
+ name: automatic-speech-recognition
54
+ dataset:
55
+ name: Multilingual Librispeech
56
+ type: multilingual_librispeech
57
+ split: dev
58
+ args:
59
+ language: fr
60
+ metrics:
61
+ - name: Dev WER
62
+ type: wer
63
+ value: 5.88
64
+ - task:
65
+ type: Automatic Speech Recognition
66
+ name: automatic-speech-recognition
67
+ dataset:
68
+ name: Multilingual Librispeech
69
+ type: multilingual_librispeech
70
+ split: test
71
+ args:
72
+ language: fr
73
+ metrics:
74
+ - name: Test WER
75
+ type: wer
76
+ value: 4.91
77
+ ---
78
+
79
+ # NVIDIA Conformer-CTC Large (fr)
80
+
81
+ <style>
82
+ img {
83
+ display: inline;
84
+ }
85
+ </style>
86
+
87
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-Conformer--CTC-lightgrey#model-badge)](#model-architecture)
88
+ | [![Model size](https://img.shields.io/badge/Params-120M-lightgrey#model-badge)](#model-architecture)
89
+ | [![Language](https://img.shields.io/badge/Language-en--US-lightgrey#model-badge)](#datasets)
90
+ | [![Riva Compatible](https://img.shields.io/badge/NVIDIA%20Riva-compatible-brightgreen#model-badge)](#deployment-with-nvidia-riva) |
91
+
92
+
93
+ This model was trained on a composite dataset (NeMo ASRSET) comprising of over a thousand hours of French speech.
94
+ It is a non-autoregressive "large" variant of Conformer, with around 120 million parameters.
95
+ 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.
96
+ It is also compatible with NVIDIA Riva for [production-grade server deployments](#deployment-with-nvidia-riva).
97
+
98
+
99
+ ## Usage
100
+
101
+ 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.
102
+
103
+ 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.
104
+
105
+ ```
106
+ pip install nemo_toolkit['all']
107
+ ```
108
+
109
+ ### Automatically instantiate the model
110
+
111
+ ```python
112
+ import nemo.collections.asr as nemo_asr
113
+ asr_model = nemo_asr.models.EncDecCTCModelBPE.from_pretrained("nvidia/stt_fr_conformer_ctc_large")
114
+ ```
115
+
116
+ ### Transcribing using Python
117
+ First, let's get a sample
118
+ ```
119
+ wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
120
+ ```
121
+ Then simply do:
122
+ ```
123
+ asr_model.transcribe(['2086-149220-0033.wav'])
124
+ ```
125
+
126
+ ### Transcribing many audio files
127
+
128
+ ```shell
129
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
130
+ pretrained_name="nvidia/stt_en_conformer_ctc_large"
131
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
132
+ ```
133
+
134
+ ### Input
135
+
136
+ This model accepts 16000 kHz Mono-channel Audio (wav files) as input.
137
+
138
+ ### Output
139
+
140
+ This model provides transcribed speech as a string for a given audio sample.
141
+
142
+ ## Model Architecture
143
+
144
+ 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).
145
+
146
+ ## Training
147
+
148
+ 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).
149
+
150
+ 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).
151
+
152
+ The checkpoint of the language model used as the neural rescorer can be found [here]( https://catalog.ngc.nvidia.com/orgs/nvidia/teams/nemo/models/stt_fr_conformer_ctc_large). 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)
153
+
154
+ ## Datasets
155
+ All the models in this collection are trained on a composite dataset (NeMo ASRSET) comprising of over a thousand hours of French speech:
156
+
157
+ - MozillaCommonVoice7.0 356 hours
158
+ - MultilingualLibreSpeech 1036 hours
159
+ - VoxPopuli 182 hours
160
+
161
+ Both models use same dataset, excluding a preprocessing step to strip hyphen from data for secondary model's training.
162
+
163
+ ## Performance
164
+ 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.
165
+
166
+ The latest model obtains the following greedy scores on the following evaluation datasets
167
+
168
+ - 8.35 % on MCV7.0 dev
169
+ - 9.63 % on MCV7.0 test
170
+ - 5.88 % on MLS dev
171
+ - 4.91 % on MLS test
172
+
173
+ With 128 beam search and 4gram KenLM model (included with this model):
174
+
175
+ - 7.95 % on MCV7.0 dev
176
+ - 9.16 % on MCV7.0 test
177
+ - 5.57 % on MLS dev
178
+ - 4.66 % on MLS test
179
+
180
+ Note that these evaluation datasets have been filtered and preprocessed to only contain French alphabet characters and are removed of punctuation outside of hyphenation and apostrophe.
181
+
182
+ ## Limitations
183
+ 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.
184
+
185
+ Further, since portions of the training set contain text from both pre- and post- 1990 orthographic reform, regularity of punctuation may vary between the two styles.
186
+ For downstream tasks requiring more consistency, finetuning or downstream processing may be required. If exact orthography is not necessary, then using secondary model is advised.
187
+
188
+
189
+ ## Deployment with NVIDIA Riva
190
+
191
+ 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.
192
+ Additionally, Riva provides:
193
+
194
+ * 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
195
+ * 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
196
+ * Streaming speech recognition, Kubernetes compatible scaling, and Enterprise-grade support
197
+
198
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
199
+
200
+ ## References
201
+
202
+ - [1] [Conformer: Convolution-augmented Transformer for Speech Recognition](https://arxiv.org/abs/2005.08100)
203
+
204
+ - [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
205
+
206
+ - [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
207
+
208
+
209
  ---