msekoyan commited on
Commit
0db01ac
1 Parent(s): 6532af7

Upload 2 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ stt_kk_ru_fastconformer_hybrid_large.nemo filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,297 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - kk
4
+ - ru
5
+ library_name: nemo
6
+ datasets:
7
+ - mozilla-foundation/common-voice-17-0
8
+ - Kazakh-Speech-Dataset
9
+ - Kazakh-Speech-Corpus-2
10
+ - mozilla-foundation/common_voice_12_0
11
+ - SberDevices/Golos
12
+ - SOVA-Dataset
13
+ - Dusha-Dataset
14
+ thumbnail: null
15
+ tags:
16
+ - automatic-speech-recognition
17
+ - speech
18
+ - audio
19
+ - Transducer
20
+ - FastConformer
21
+ - CTC
22
+ - Transformer
23
+ - pytorch
24
+ - NeMo
25
+ - hf-asr-leaderboard
26
+ license: cc-by-4.0
27
+ model-index:
28
+ - name: stt_kk_ru_fastconformer_hybrid_large
29
+ results:
30
+ - task:
31
+ name: Automatic Speech Recognition
32
+ type: automatic-speech-recognition
33
+ dataset:
34
+ name: common-voice-17-0
35
+ type: mozilla-foundation/common_voice_17_0
36
+ config: kk
37
+ split: test
38
+ args:
39
+ language: kk
40
+ metrics:
41
+ - name: Test WER
42
+ type: wer
43
+ value: 15.48
44
+ - task:
45
+ name: Automatic Speech Recognition
46
+ type: automatic-speech-recognition
47
+ dataset:
48
+ name: Kazakh Speech Dataset
49
+ type: Kazakh-Speech-Dataset
50
+ config: kk
51
+ split: test
52
+ args:
53
+ language: kk
54
+ metrics:
55
+ - name: Test WER
56
+ type: wer
57
+ value: 7.08
58
+ - task:
59
+ name: Automatic Speech Recognition
60
+ type: automatic-speech-recognition
61
+ dataset:
62
+ name: Kazakh Speech Corpus 2 (read)
63
+ type: Kazakh-Speech-Corpus-2
64
+ config: kk
65
+ split: test
66
+ args:
67
+ language: kk
68
+ metrics:
69
+ - name: Test WER
70
+ type: wer
71
+ value: 4.43
72
+ - task:
73
+ name: Automatic Speech Recognition
74
+ type: automatic-speech-recognition
75
+ dataset:
76
+ name: Kazakh Speech Corpus 2 (spontaneous)
77
+ type: Kazakh-Speech-Corpus-2
78
+ config: kk
79
+ split: test
80
+ args:
81
+ language: kk
82
+ metrics:
83
+ - name: Test WER
84
+ type: wer
85
+ value: 15.25
86
+ - task:
87
+ name: Automatic Speech Recognition
88
+ type: automatic-speech-recognition
89
+ dataset:
90
+ name: common-voice-12-0
91
+ type: mozilla-foundation/common_voice_12_0
92
+ config: ru
93
+ split: test
94
+ args:
95
+ language: ru
96
+ metrics:
97
+ - name: Test WER
98
+ type: wer
99
+ value: 6.29
100
+ - task:
101
+ type: Automatic Speech Recognition
102
+ name: automatic-speech-recognition
103
+ dataset:
104
+ name: Sberdevices Golos (crowd)
105
+ type: SberDevices/Golos
106
+ config: crowd
107
+ split: test
108
+ args:
109
+ language: ru
110
+ metrics:
111
+ - name: Test WER
112
+ type: wer
113
+ value: 2.46
114
+ - task:
115
+ type: Automatic Speech Recognition
116
+ name: automatic-speech-recognition
117
+ dataset:
118
+ name: Sberdevices Golos (farfield)
119
+ type: SberDevices/Golos
120
+ config: farfield
121
+ split: test
122
+ args:
123
+ language: ru
124
+ metrics:
125
+ - name: Test WER
126
+ type: wer
127
+ value: 5.98
128
+ - task:
129
+ name: Automatic Speech Recognition
130
+ type: automatic-speech-recognition
131
+ dataset:
132
+ name: Sova (RuAudiobooksDevices)
133
+ type: SOVA-Dataset
134
+ config: ru
135
+ split: test
136
+ args:
137
+ language: ru
138
+ metrics:
139
+ - name: Test WER
140
+ type: wer
141
+ value: 4.41
142
+ - task:
143
+ name: Automatic Speech Recognition
144
+ type: automatic-speech-recognition
145
+ dataset:
146
+ name: Sova (RuDevices)
147
+ type: SOVA-Dataset
148
+ config: ru
149
+ split: test
150
+ args:
151
+ language: ru
152
+ metrics:
153
+ - name: Test WER
154
+ type: wer
155
+ value: 19.83
156
+
157
+ ---
158
+
159
+ # NVIDIA FastConformer-Hybrid Large (ru)
160
+
161
+ <style>
162
+ img {
163
+ display: inline;
164
+ }
165
+ </style>
166
+
167
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-FastConformer--Transducer_CTC-lightgrey#model-badge)](#model-architecture)
168
+ | [![Model size](https://img.shields.io/badge/Params-115M-lightgrey#model-badge)](#model-architecture)
169
+ | [![Language](https://img.shields.io/badge/Language-kk_ru-lightgrey#model-badge)](#datasets)
170
+
171
+
172
+ This model transcribes speech in lower case Kazakh and Russian alphabet.
173
+ It is a "large" version of FastConformer Transducer-CTC (around 115M parameters) model. This is a hybrid model trained on two losses: Token-and-Duration Transducer (default) and CTC.
174
+ 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.
175
+
176
+ ## NVIDIA NeMo: Training
177
+
178
+ 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.
179
+ ```
180
+ pip install nemo_toolkit['all']
181
+ ```
182
+
183
+ ## How to Use this Model
184
+
185
+ 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.
186
+
187
+ ### Automatically instantiate the model
188
+
189
+ ```python
190
+ import nemo.collections.asr as nemo_asr
191
+ asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="nvidia/stt_kk_ru_fastconformer_hybrid_large")
192
+ ```
193
+
194
+ ### Transcribing using Python
195
+ First, let's get a sample
196
+ ```
197
+ wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
198
+ ```
199
+ Then simply do:
200
+ ```
201
+ asr_model.transcribe(['2086-149220-0033.wav'])
202
+ ```
203
+
204
+ ### Transcribing many audio files
205
+
206
+ Using Transducer mode inference:
207
+ ```shell
208
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
209
+ pretrained_name="nvidia/stt_kk_ru_fastconformer_hybrid_large"
210
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
211
+ ```
212
+
213
+ Using CTC mode inference:
214
+ ```shell
215
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
216
+ pretrained_name="nvidia/stt_kk_ru_fastconformer_hybrid_large"
217
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
218
+ decoder_type="ctc"
219
+ ```
220
+
221
+ ### Input
222
+
223
+ This model accepts 16000 Hz Mono-channel Audio (wav files) as input.
224
+
225
+ ### Output
226
+
227
+ This model provides transcribed speech as a string for a given audio sample.
228
+
229
+ ## Model Architecture
230
+
231
+ 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 Token-and-Duration 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).
232
+
233
+ ## Training
234
+
235
+ 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).
236
+
237
+ 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).
238
+
239
+ ### Datasets
240
+
241
+ The model is trained on two composite datasets comprising of 1550 hours of Kazakh speech:
242
+
243
+ - MCV 17.0 Kazakh (1 hrs)
244
+ - Kazakh Speech Dataset (KSD) (416 hrs)
245
+ - Kazakh Speech Corpus 2 (KSC2) (1133 hrs)
246
+
247
+ and approximately 850 hrs of Russian speech:
248
+
249
+ - Golos (604 hrs)
250
+ - Sova (122 hrs)
251
+ - Dusha (102 hrs)
252
+ - MCV12 (19 hrs)
253
+
254
+ ## Performance
255
+
256
+ 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.
257
+
258
+ The following tables summarizes the performance of the model with the Transducer decoder. Performances of the ASR models are reported in terms of Word Error Rate (WER%) with greedy decoding.
259
+
260
+
261
+ a) On Kazakh data
262
+ | **Version** | **Tokenizer** | **Vocabulary Size** | **MCV 17.0 TEST** | **KSD TEST** | **KSC2 TEST Read** | **KSC2 TEST Spontaneous** |
263
+ |:-----------:|:---------------------:|:-------------------:|:-----------------:|:------------:|:------------------:|:-------------------------:|
264
+ | 2.0.0 | SentencePiece Unigram | 1024 | 15.48 | 7.08 | 4.43 | 15.25 |
265
+
266
+
267
+ b) On Russian data
268
+ | **Version** | **Tokenizer** | **Vocabulary Size** | **MCV12 TEST** | **Sova TEST RuDevices** | **Sova TEST RuAudiobooksDevices** | **GOLOS TEST FARFIELD** | **GOLOS TEST CROWD** | **DUSHA TEST** |
269
+ |:-----------:|:---------------------:|:-------------------:|:--------------:|:-----------------------:|:---------------------------------:|:-----------------------:|:--------------------:|:--------------:|
270
+ | 2.0.0 | SentencePiece Unigram | 1024 | 6.29 | 19.83 | 4.41 | 5.98 | 2.46 | 5.93 |
271
+
272
+
273
+ ## Limitations
274
+ The model is non-streaming and outputs the speech as a string without capitalization and punctuation. 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.
275
+
276
+ ## NVIDIA Riva: Deployment
277
+
278
+ [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.
279
+ Additionally, Riva provides:
280
+
281
+ * 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
282
+ * 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
283
+ * Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
284
+
285
+ Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
286
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
287
+
288
+ ## References
289
+ [1] [Fast Conformer with Linearly Scalable Attention for Efficient Speech Recognition](https://arxiv.org/abs/2305.05084)
290
+
291
+ [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
292
+
293
+ [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
294
+
295
+ ## Licence
296
+
297
+ 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.
stt_kk_ru_fastconformer_hybrid_large.nemo ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99a07c16f5b336dd2dac9cf1b85fa03d05baab6a56e1f59fd4ab90409a7c6e19
3
+ size 459192320