algorithco rima-shahbazyan commited on
Commit
093f65d
·
0 Parent(s):

Duplicate from nvidia/stt_uz_fastconformer_hybrid_large_pc

Browse files

Co-authored-by: Rima <rima-shahbazyan@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz 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_uz_fastconformer_hybrid_large_pc.nemo filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 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
+ output = asr_model.transcribe(['audio_file.wav'])
95
+ print(output[0].text)
96
+ ```
97
+
98
+ ### Transcribing many audio files
99
+
100
+ Using Transducer mode inference:
101
+ ```shell
102
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
103
+ pretrained_name="nvidia/stt_uz_fastconformer_hybrid_large_pc"
104
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
105
+ ```
106
+
107
+ Using CTC mode inference:
108
+ ```shell
109
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
110
+ pretrained_name="nvidia/stt_uz_fastconformer_hybrid_large_pc"
111
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
112
+ decoder_type="ctc"
113
+ ```
114
+
115
+ ### Input
116
+
117
+ This model accepts 16000 Hz Mono-channel Audio (wav files) as input.
118
+
119
+ ### Output
120
+
121
+ This model provides transcribed speech as a string for a given audio sample.
122
+
123
+ ## Model Architecture
124
+
125
+ 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 a Transducer 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).
126
+
127
+ ## Training
128
+
129
+ 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).
130
+
131
+ 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).
132
+
133
+ ### Datasets
134
+
135
+ The model is trained on three composite datasets comprising of 1000 hours of Uzbek speech:
136
+
137
+ - MCV 17.0 Uzbek (~90 hrs)
138
+ - UzbekVoice (~900 hrs)
139
+ - Fleurs Uzbek (~10 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 model with the Transducer decoder. Performances of the ASR models are reported in terms of Word Error Rate (WER%) with greedy decoding.
146
+
147
+
148
+ | |**WER(%)**|**WER wo CAP**|**WER wo PUNCT**| **WER wo PUNCT CAP**|
149
+ |-------------------------------|:--------:|:------------:|:--------------:|:-------------------:|
150
+ | **FLEURS DEV (used as test)** | 17.52 | 16.20 | 12.20 | 10.73 |
151
+ | **MCV TEST** | 16.46 | 15.89 | 7.78 | 7.18 |
152
+
153
+ ## Limitations
154
+ 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.
155
+
156
+ ## NVIDIA Riva: Deployment
157
+
158
+ [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.
159
+ Additionally, Riva provides:
160
+
161
+ * 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
162
+ * 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
163
+ * Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
164
+
165
+ Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
166
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
167
+
168
+ ## References
169
+ [1] [Fast Conformer with Linearly Scalable Attention for Efficient Speech Recognition](https://arxiv.org/abs/2305.05084)
170
+
171
+ [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
172
+
173
+ [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
174
+
175
+ ## Licence
176
+
177
+ 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_uz_fastconformer_hybrid_large_pc.nemo ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:882f49511b1ab2b6f7f8b564372c1f121cf983733f0b16cf8d2815515c7213da
3
+ size 459212800