kunaldhawan commited on
Commit
bb54611
1 Parent(s): ca7639b

Added model card for RU

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