mexa commited on
Commit
fd6eec7
1 Parent(s): d9061e1

Add ASR model

Browse files
.gitattributes CHANGED
@@ -32,3 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
35
+ *.nemo filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - Transducer
15
+ - Conformer
16
+ - Transformer
17
+ - pytorch
18
+ - NeMo
19
+ - hf-asr-leaderboard
20
+ license: cc-by-4.0
21
+ model-index:
22
+ - name: stt_fr_conformer_transducer_large
23
+ results:
24
+ - task:
25
+ name: Automatic Speech Recognition
26
+ type: automatic-speech-recognition
27
+ dataset:
28
+ name: MCV 7.0
29
+ type: mozilla-foundation/common_voice_7_0
30
+ config: fr
31
+ split: dev
32
+ args:
33
+ language: fr
34
+ metrics:
35
+ - name: Dev WER
36
+ type: wer
37
+ value: 6.85
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
+ config: fr
45
+ split: test
46
+ args:
47
+ language: fr
48
+ metrics:
49
+ - name: Test WER
50
+ type: wer
51
+ value: 7.95
52
+ - task:
53
+ type: Automatic Speech Recognition
54
+ name: automatic-speech-recognition
55
+ dataset:
56
+ name: Multilingual Librispeech
57
+ type: multilingual_librispeech
58
+ config: fr
59
+ split: dev
60
+ args:
61
+ language: fr
62
+ metrics:
63
+ - name: Dev WER
64
+ type: wer
65
+ value: 5.05
66
+ - task:
67
+ type: Automatic Speech Recognition
68
+ name: automatic-speech-recognition
69
+ dataset:
70
+ name: Multilingual Librispeech
71
+ type: multilingual_librispeech
72
+ config: fr
73
+ split: test
74
+ args:
75
+ language: fr
76
+ metrics:
77
+ - name: Test WER
78
+ type: wer
79
+ value: 4.1
80
+ ---
81
+
82
+ # NVIDIA Conformer-Transducer Large (fr) (FORK)
83
+
84
+ <style>
85
+ img {
86
+ display: inline;
87
+ }
88
+ </style>
89
+
90
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-Conformer--Transducer-lightgrey#model-badge)](#model-architecture)
91
+ | [![Model size](https://img.shields.io/badge/Params-120M-lightgrey#model-badge)](#model-architecture)
92
+ | [![Language](https://img.shields.io/badge/Language-fr-lightgrey#model-badge)](#datasets)
93
+
94
+ This model was trained on a composite dataset comprising of over 1500 hours of French speech. It is a large size version of Conformer-Transducer (around 120M 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-transducer) for complete architecture details.
96
+
97
+ ## NVIDIA NeMo: Training
98
+
99
+ 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.
100
+
101
+ ```
102
+ pip install nemo_toolkit['all']
103
+ ```
104
+
105
+ ## How to Use this Model
106
+
107
+ 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.
108
+
109
+ ### Automatically instantiate the model
110
+
111
+ ```python
112
+ import nemo.collections.asr as nemo_asr
113
+ asr_model = nemo_asr.models.EncDecRNNTBPEModel.from_pretrained("nvidia/stt_fr_conformer_transducer_large")
114
+ ```
115
+
116
+ ### Transcribing using Python
117
+
118
+ First, let's get a sample
119
+
120
+ ```
121
+ wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
122
+ ```
123
+
124
+ Then simply do:
125
+
126
+ ```
127
+ asr_model.transcribe(['2086-149220-0033.wav'])
128
+ ```
129
+
130
+ ### Transcribing many audio files
131
+
132
+ ```shell
133
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
134
+ pretrained_name="nvidia/stt_fr_conformer_transducer_large"
135
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
136
+ ```
137
+
138
+ ### Input
139
+
140
+ This model accepts 16000 kHz Mono-channel Audio (wav files) as input.
141
+
142
+ ### Output
143
+
144
+ This model provides transcribed speech as a string for a given audio sample.
145
+
146
+ ## Model Architecture
147
+
148
+ Conformer-Transducer model is an autoregressive variant of Conformer model [1] for Automatic Speech Recognition which uses Transducer loss/decoding instead of CTC Loss. You may find more info on the detail of this model here: [Conformer-Transducer Model](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/models.html).
149
+
150
+ ## Training
151
+
152
+ 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_transducer/speech_to_text_rnnt_bpe.py) and this [base config](https://github.com/NVIDIA/NeMo/blob/main/examples/asr/conf/conformer/conformer_transducer_bpe.yaml).
153
+
154
+ The sentence-piece tokenizers [2] 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).
155
+
156
+ ## Datasets
157
+
158
+ All the models in this collection are trained on a composite dataset (NeMo ASRSET) comprising of over a thousand hours of French speech:
159
+
160
+ - MozillaCommonVoice 7.0 - 356 hours
161
+ - Multilingual LibriSpeech - 1036 hours
162
+ - VoxPopuli - 182 hours
163
+
164
+ Both models use same dataset, excluding a preprocessing step to strip hyphen from data for secondary model's training.
165
+
166
+ ## Performance
167
+
168
+ 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.
169
+
170
+ The latest model obtains the following greedy scores on the following evaluation datasets
171
+
172
+ - 6.85 % on MCV7.0 dev
173
+ - 7.95 % on MCV7.0 test
174
+ - 5.05 % on MLS dev
175
+ - 4.10 % on MLS test
176
+
177
+ 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.
178
+
179
+ ## Limitations
180
+
181
+ 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.
182
+
183
+ 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.
184
+ 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.
185
+
186
+ ## References
187
+
188
+ - [1] [Conformer: Convolution-augmented Transformer for Speech Recognition](https://arxiv.org/abs/2005.08100)
189
+
190
+ - [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
191
+
192
+ - [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
stt_fr_conformer_transducer_large.nemo ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:125131fe6a7069d05e562b3a1b20caddb4dc34fd0f9509dbfd18677a7a88beef
3
+ size 442137832