rima-shahbazyan commited on
Commit
cf471db
·
verified ·
1 Parent(s): 38b00b2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +183 -3
README.md CHANGED
@@ -1,3 +1,183 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - uz
4
+ library_name: nemo
5
+ datasets:
6
+ - mozilla-foundation/common-voice-17-0
7
+ - UzbekVoice
8
+ - google/fleurs
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_uz_fastconformer_hybrid_large_pc
24
+ results:
25
+ - task:
26
+ name: Automatic Speech Recognition
27
+ type: automatic-speech-recognition
28
+ dataset:
29
+ name: common-voice-17-0
30
+ type: mozilla-foundation/common_voice_17_0
31
+ config: uz
32
+ split: test
33
+ args:
34
+ language: uz
35
+ metrics:
36
+ - name: Test WER
37
+ type: wer
38
+ value: 16.46
39
+ - task:
40
+ name: Automatic Speech Recognition
41
+ type: automatic-speech-recognition
42
+ dataset:
43
+ name: google/fleurs
44
+ type: google/fleurs
45
+ config: uz
46
+ split: dev
47
+ args:
48
+ language: uz
49
+ metrics:
50
+ - name: Test WER
51
+ type: wer
52
+ value: 17.52
53
+
54
+ ---
55
+
56
+ # NVIDIA FastConformer-Hybrid Large (uz)
57
+
58
+ <style>
59
+ img {
60
+ display: inline;
61
+ }
62
+ </style>
63
+
64
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-FastConformer--Transducer_CTC-lightgrey#model-badge)](#model-architecture)
65
+ | [![Model size](https://img.shields.io/badge/Params-115M-lightgrey#model-badge)](#model-architecture)
66
+ | [![Language](https://img.shields.io/badge/Language-uz-lightgrey#model-badge)](#datasets)
67
+
68
+
69
+ This model transcribes text in upper and lower case Uzbek alphabet with spaces, commas, question marks, and dashes.
70
+ 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.
71
+ 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.
72
+
73
+ ## NVIDIA NeMo: Training
74
+
75
+ 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.
76
+ ```
77
+ pip install nemo_toolkit['all']
78
+ ```
79
+
80
+ ## How to Use this Model
81
+
82
+ 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.
83
+
84
+ ### Automatically instantiate the model
85
+
86
+ ```python
87
+ import nemo.collections.asr as nemo_asr
88
+ asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="nvidia/stt_uz_fastconformer_hybrid_large_pc")
89
+ ```
90
+
91
+ ### Transcribing using Python
92
+ Simply do:
93
+ ```
94
+ asr_model.transcribe(['audio_file.wav'])
95
+ ```
96
+
97
+ ### Transcribing many audio files
98
+
99
+ Using Transducer mode inference:
100
+ ```shell
101
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
102
+ pretrained_name="nvidia/stt_uz_fastconformer_hybrid_large_pc"
103
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
104
+ ```
105
+
106
+ Using CTC mode inference:
107
+ ```shell
108
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
109
+ pretrained_name="nvidia/stt_uz_fastconformer_hybrid_large_pc"
110
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
111
+ decoder_type="ctc"
112
+ ```
113
+
114
+ ### Input
115
+
116
+ This model accepts 16000 Hz Mono-channel Audio (wav files) as input.
117
+
118
+ ### Output
119
+
120
+ This model provides transcribed speech as a string for a given audio sample.
121
+
122
+ ## Model Architecture
123
+
124
+ 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).
125
+
126
+ ## Training
127
+
128
+ 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).
129
+
130
+ 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).
131
+
132
+ ### Datasets
133
+
134
+ The model is trained on three composite datasets comprising of 1000 hours of Uzbek speech:
135
+
136
+ - MCV 17.0 Uzbek (~90 hrs)
137
+ - UzbekVoice (~900 hrs)
138
+ - Fleurs Uzbek (~10 hrs)
139
+
140
+ ## Performance
141
+
142
+ 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.
143
+
144
+ 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.
145
+
146
+
147
+ | **Tokenizer** | **Vocabulary Size** | **MCV 17.0 TEST** | **KSD TEST** | **KSC2 TEST Read** | **KSC2 TEST Spontaneous** |
148
+ |:---------------------:|:-------------------:|:-----------------:|:------------:|:------------------:|:-------------------------:|
149
+ | SentencePiece Unigram | 1024 | 15.48 | 7.08 | 4.43 | 15.25 |
150
+
151
+
152
+ | | **WER(%)** |
153
+ |---------------------------|:------:|:------------:|:--------------:|:-------------------:|
154
+ | |**WER** |**WER wo CAP**|**WER wo PUNCT**| **WER wo PUNCT CAP**|
155
+ |---------------------------|:------:|:------------:|:--------------:|:-------------------:|
156
+ | FLEURS DEV (used as test) | 17.52 | 16.20 | 12.20 | 10.73 |
157
+ | MCV TEST | 16.46 | 15.89 | 7.78 | 7.18 |
158
+
159
+ ## Limitations
160
+ 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.
161
+
162
+ ## NVIDIA Riva: Deployment
163
+
164
+ [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.
165
+ Additionally, Riva provides:
166
+
167
+ * 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
168
+ * 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
169
+ * Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
170
+
171
+ Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
172
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
173
+
174
+ ## References
175
+ [1] [Fast Conformer with Linearly Scalable Attention for Efficient Speech Recognition](https://arxiv.org/abs/2305.05084)
176
+
177
+ [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
178
+
179
+ [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
180
+
181
+ ## Licence
182
+
183
+ 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.