nkarpov commited on
Commit
1115aee
1 Parent(s): 48ac009
Files changed (1) hide show
  1. README.md +181 -0
README.md CHANGED
@@ -1,3 +1,184 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - uk
4
+ library_name: nemo
5
+ datasets:
6
+ - mozilla-foundation/common_voice_12_0
7
+ - M-AILabs
8
+ thumbnail: null
9
+ tags:
10
+ - automatic-speech-recognition
11
+ - speech
12
+ - audio
13
+ - Transducer
14
+ - FastConformer
15
+ - CTC
16
+ - Transformer
17
+ - pytorch
18
+ - NeMo
19
+ - hf-asr-leaderboard
20
  license: cc-by-4.0
21
+ model-index:
22
+ - name: stt_uk_fastconformer_hybrid_large_pc
23
+ results:
24
+ - task:
25
+ name: Automatic Speech Recognition
26
+ type: automatic-speech-recognition
27
+ dataset:
28
+ name: common-voice-12-0
29
+ type: mozilla-foundation/common_voice_12_0
30
+ config: Ukrainian
31
+ split: test
32
+ args:
33
+ language: uk
34
+ metrics:
35
+ - name: Test WER
36
+ type: wer
37
+ value: 5.53
38
+ - task:
39
+ name: Automatic Speech Recognition
40
+ type: automatic-speech-recognition
41
+ dataset:
42
+ name: common-voice-12-0
43
+ type: mozilla-foundation/common_voice_12_0
44
+ config: Ukrainian P&C
45
+ split: test
46
+ args:
47
+ language: uk
48
+ metrics:
49
+ - name: Test WER P&C
50
+ type: wer
51
+ value: 6.92
52
  ---
53
+
54
+ # NVIDIA FastConformer-Hybrid Large (uk)
55
+
56
+ <style>
57
+ img {
58
+ display: inline;
59
+ }
60
+ </style>
61
+
62
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-FastConformer--Transducer_CTC-lightgrey#model-badge)](#model-architecture)
63
+ | [![Model size](https://img.shields.io/badge/Params-115M-lightgrey#model-badge)](#model-architecture)
64
+ | [![Language](https://img.shields.io/badge/Language-uk-lightgrey#model-badge)](#datasets)
65
+
66
+
67
+ This model transcribes speech in upper and lower case Ukrainian alphabet along with spaces, periods, commas, and question marks.
68
+ 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.
69
+ 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.
70
+
71
+ ## NVIDIA NeMo: Training
72
+
73
+ 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.
74
+ ```
75
+ pip install nemo_toolkit['all']
76
+ ```
77
+
78
+ ## How to Use this Model
79
+
80
+ 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.
81
+
82
+ ### Automatically instantiate the model
83
+
84
+ ```python
85
+ import nemo.collections.asr as nemo_asr
86
+ asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="nvidia/stt_uk_fastconformer_hybrid_large_pc")
87
+ ```
88
+
89
+ ### Transcribing using Python
90
+ First, let's get a sample
91
+ ```
92
+ wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
93
+ ```
94
+ Then simply do:
95
+ ```
96
+ asr_model.transcribe(['2086-149220-0033.wav'])
97
+ ```
98
+
99
+ ### Transcribing many audio files
100
+
101
+ Using Transducer mode inference:
102
+ ```shell
103
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
104
+ pretrained_name="nvidia/stt_uk_fastconformer_hybrid_large_pc"
105
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
106
+ ```
107
+
108
+ Using CTC mode inference:
109
+ ```shell
110
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
111
+ pretrained_name="nvidia/stt_uk_fastconformer_hybrid_large_pc"
112
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
113
+ decoder_type="ctc"
114
+ ```
115
+
116
+ ### Input
117
+
118
+ This model accepts 16000 Hz Mono-channel Audio (wav files) as input.
119
+
120
+ ### Output
121
+
122
+ This model provides transcribed speech as a string for a given audio sample.
123
+
124
+ ## Model Architecture
125
+
126
+ FastConformer is an optimized version of the Conformer model [1] 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).
127
+
128
+ ## Training
129
+
130
+ 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).
131
+
132
+ 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).
133
+
134
+ ### Datasets
135
+
136
+ All the models in this collection are trained on a composite dataset (NeMo PnC ASRSET) comprising of 153 hours of Ukrainian speech:
137
+
138
+ - MCV12 (70 hrs)
139
+ - M-AILabs (83 hrs)
140
+
141
+ ## Performance
142
+
143
+ 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.
144
+
145
+ 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.
146
+
147
+
148
+ a) On data without Punctuation and Capitalization with Transducer decoder
149
+ | **Version** | **Tokenizer** | **Vocabulary Size** | **MCV12 TEST** |
150
+ |:-----------:|:---------------------:|:-------------------:|:-------------:|
151
+ | 1.0.0 | SentencePiece Unigram | 512 | 5.53 |
152
+
153
+
154
+ b) On data with Punctuation and Capitalization with Transducer decoder
155
+ | **Version** | **Tokenizer** | **Vocabulary Size** | **MCV12 TEST** |
156
+ |:-----------:|:---------------------:|:-------------------:|:-------------:|
157
+ | 1.0.0 | SentencePiece Unigram | 512 | 6.92 |
158
+
159
+
160
+ ## Limitations
161
+ 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.
162
+
163
+ ## NVIDIA Riva: Deployment
164
+
165
+ [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.
166
+ Additionally, Riva provides:
167
+
168
+ * 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
169
+ * 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
170
+ * Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
171
+
172
+ Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
173
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
174
+
175
+ ## References
176
+ [1] [Conformer: Convolution-augmented Transformer for Speech Recognition](https://arxiv.org/abs/2005.08100)
177
+
178
+ [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
179
+
180
+ [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
181
+
182
+ ## Licence
183
+
184
+ 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.