kunaldhawan commited on
Commit
eb55e6e
1 Parent(s): 6cbde3e

updated model card for FR

Browse files
Files changed (1) hide show
  1. README.md +239 -0
README.md CHANGED
@@ -1,3 +1,242 @@
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_12_0
8
+ - VoxPopuli-(DE)
9
+ thumbnail: null
10
+ tags:
11
+ - automatic-speech-recognition
12
+ - speech
13
+ - audio
14
+ - Transducer
15
+ - FastConformer
16
+ - CTC
17
+ - Transformer
18
+ - pytorch
19
+ - NeMo
20
+ - hf-asr-leaderboard
21
  license: cc-by-4.0
22
+ model-index:
23
+ - name: stt_fr_fastconformer_hybrid_large_pc
24
+ results:
25
+ - task:
26
+ name: Automatic Speech Recognition
27
+ type: automatic-speech-recognition
28
+ dataset:
29
+ name: common-voice-12-0
30
+ type: mozilla-foundation/common_voice_12_0
31
+ config: fr
32
+ split: test
33
+ args:
34
+ language: fr
35
+ metrics:
36
+ - name: Test WER
37
+ type: wer
38
+ value: 7.92
39
+ - task:
40
+ type: Automatic Speech Recognition
41
+ name: automatic-speech-recognition
42
+ dataset:
43
+ name: Multilingual LibriSpeech
44
+ type: facebook/multilingual_librispeech
45
+ config: french
46
+ split: test
47
+ args:
48
+ language: fr
49
+ metrics:
50
+ - name: Test WER
51
+ type: wer
52
+ value: 5.21
53
+ - task:
54
+ type: Automatic Speech Recognition
55
+ name: automatic-speech-recognition
56
+ dataset:
57
+ name: Vox Populi
58
+ type: facebook/voxpopuli
59
+ config: french
60
+ split: test
61
+ args:
62
+ language: fr
63
+ metrics:
64
+ - name: Test WER
65
+ type: wer
66
+ value: 6.49
67
+ - task:
68
+ name: Automatic Speech Recognition
69
+ type: automatic-speech-recognition
70
+ dataset:
71
+ name: common-voice-12-0
72
+ type: mozilla-foundation/common_voice_12_0
73
+ config: French P&C
74
+ split: test
75
+ args:
76
+ language: fr
77
+ metrics:
78
+ - name: Test WER P&C
79
+ type: wer
80
+ value: 9.11
81
+ - task:
82
+ type: Automatic Speech Recognition
83
+ name: automatic-speech-recognition
84
+ dataset:
85
+ name: Multilingual LibriSpeech
86
+ type: facebook/multilingual_librispeech
87
+ config: French P&C
88
+ split: test
89
+ args:
90
+ language: fr
91
+ metrics:
92
+ - name: Test WER P&C
93
+ type: wer
94
+ value: 10.6
95
+ - task:
96
+ type: Automatic Speech Recognition
97
+ name: automatic-speech-recognition
98
+ dataset:
99
+ name: Vox Populi
100
+ type: facebook/voxpopuli
101
+ config: French P&C
102
+ split: test
103
+ args:
104
+ language: fr
105
+ metrics:
106
+ - name: Test WER P&C
107
+ type: wer
108
+ value: 8.97
109
  ---
110
+
111
+ # NVIDIA FastConformer-Hybrid Large (fr)
112
+
113
+ <style>
114
+ img {
115
+ display: inline;
116
+ }
117
+ </style>
118
+
119
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-FastConformer--Transducer_CTC-lightgrey#model-badge)](#model-architecture)
120
+ | [![Model size](https://img.shields.io/badge/Params-115M-lightgrey#model-badge)](#model-architecture)
121
+ | [![Language](https://img.shields.io/badge/Language-fr-lightgrey#model-badge)](#datasets)
122
+
123
+
124
+ This model transcribes speech in upper and lower case French alphabet along with spaces, periods, commas, and question marks.
125
+ 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.
126
+ 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.
127
+
128
+ ## NVIDIA NeMo: Training
129
+
130
+ 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.
131
+ ```
132
+ pip install nemo_toolkit['all']
133
+ ```
134
+
135
+ ## How to Use this Model
136
+
137
+ 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.
138
+
139
+ ### Automatically instantiate the model
140
+
141
+ ```python
142
+ import nemo.collections.asr as nemo_asr
143
+ asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="nvidia/stt_fr_fastconformer_hybrid_large_pc")
144
+ ```
145
+
146
+ ### Transcribing using Python
147
+ First, let's get a sample
148
+ ```
149
+ wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
150
+ ```
151
+ Then simply do:
152
+ ```
153
+ asr_model.transcribe(['2086-149220-0033.wav'])
154
+ ```
155
+
156
+ ### Transcribing many audio files
157
+
158
+ Using Transducer mode inference:
159
+ ```shell
160
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
161
+ pretrained_name="nvidia/stt_fr_fastconformer_hybrid_large_pc"
162
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
163
+ ```
164
+
165
+ Using CTC mode inference:
166
+ ```shell
167
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
168
+ pretrained_name="nvidia/stt_fr_fastconformer_hybrid_large_pc"
169
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
170
+ decoder_type="ctc"
171
+ ```
172
+
173
+ ### Input
174
+
175
+ This model accepts 16000 Hz Mono-channel Audio (wav files) as input.
176
+
177
+ ### Output
178
+
179
+ This model provides transcribed speech as a string for a given audio sample.
180
+
181
+ ## Model Architecture
182
+
183
+ 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 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).
184
+
185
+ ## Training
186
+
187
+ 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).
188
+
189
+ 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).
190
+
191
+ ### Datasets
192
+
193
+ All the models in this collection are trained on a composite dataset (NeMo PnC ASRSET) comprising of 1800 hours of German speech:
194
+
195
+ - MCV12 (710 hrs)
196
+ - MLS (925 hrs)
197
+ - Voxpopuli (165 hrs)
198
+
199
+ ## Performance
200
+
201
+ 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.
202
+
203
+ 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.
204
+
205
+
206
+ a) On data without Punctuation and Capitalization with Transducer decoder
207
+ | **Version** | **Tokenizer** | **Vocabulary Size** | **MCV12 DEV** | **MCV12 TEST** | **MLS DEV** | **MLS TEST** | **VOXPOPULI DEV** | **VOXPOPULI TEST** |
208
+ |:-----------:|:---------------------:|:-------------------:|:-------------:|:--------------:|:-----------:|:------------:|:-----------------:|:------------------:|
209
+ | 1.18.0 | SentencePiece Unigram | 1024 | 6.84 | 7.92 | 5.0 | 5.21 | 5.86 | 6.49 |
210
+
211
+
212
+ b) On data with Punctuation and Capitalization with Transducer decoder
213
+ | **Version** | **Tokenizer** | **Vocabulary Size** | **MCV12 DEV** | **MCV12 TEST** | **MLS DEV** | **MLS TEST** | **VOXPOPULI DEV** | **VOXPOPULI TEST** |
214
+ |:-----------:|:---------------------:|:-------------------:|:-------------:|:--------------:|:-----------:|:------------:|:-----------------:|:------------------:|
215
+ | 1.18.0 | SentencePiece Unigram | 1024 | 8.04 | 9.11 | 10.95 | 10.6 | 8.5 | 8.97 |
216
+
217
+
218
+ ## Limitations
219
+ 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.
220
+
221
+ ## NVIDIA Riva: Deployment
222
+
223
+ [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.
224
+ Additionally, Riva provides:
225
+
226
+ * 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
227
+ * 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
228
+ * Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
229
+
230
+ Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
231
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
232
+
233
+ ## References
234
+ [1] [Fast Conformer with Linearly Scalable Attention for Efficient Speech Recognition](https://arxiv.org/abs/2305.05084)
235
+
236
+ [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
237
+
238
+ [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
239
+
240
+ ## Licence
241
+
242
+ 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.