lilgrigs commited on
Commit
cf80dac
·
verified ·
0 Parent(s):

Super-squash branch 'main' using huggingface_hub

Browse files
.gitattributes ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_ar_fastconformer_hybrid_large_pc.nemo filter=lfs diff=lfs merge=lfs -text
37
+ stt_ar_fastconformer_hybrid_large_pc_v1.0.nemo filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ datasets:
4
+ - mozilla-foundation/common_voice_17_0
5
+ - google/fleurs
6
+ - MASC
7
+ language:
8
+ - ar
9
+ pipeline_tag: automatic-speech-recognition
10
+ library_name: NeMo
11
+ metrics:
12
+ - WER
13
+ - CER
14
+ tags:
15
+ - speech-recognition
16
+ - ASR
17
+ - Arabic
18
+ - Conformer
19
+ - Transducer
20
+ - CTC
21
+ - NeMo
22
+ - hf-asr-leaderboard
23
+ - speech
24
+ - audio
25
+ model-index:
26
+ - name: stt_ar_fastconformer_hybrid_large_pc_v1.0
27
+ results:
28
+ - task:
29
+ name: Automatic Speech Recognition
30
+ type: automatic-speech-recognition
31
+ dataset:
32
+ name: MASC
33
+ split: test
34
+ type: masc
35
+ args:
36
+ language: ar
37
+ metrics:
38
+ - name: Test WER
39
+ type: wer
40
+ value: 11.46
41
+ - task:
42
+ name: Automatic Speech Recognition
43
+ type: automatic-speech-recognition
44
+ dataset:
45
+ name: MCV17
46
+ type: mozilla-foundation/common_voice_17_0
47
+ split: test
48
+ args:
49
+ language: ar
50
+ metrics:
51
+ - name: Test WER
52
+ type: wer
53
+ value: 10.20
54
+ - task:
55
+ type: Automatic Speech Recognition
56
+ name: automatic-speech-recognition
57
+ dataset:
58
+ name: FLEURS
59
+ type: google/fleurs
60
+ split: test
61
+ args:
62
+ language: ar
63
+ metrics:
64
+ - name: Test WER
65
+ type: wer
66
+ value: 8.18
67
+ ---
68
+
69
+ # NVIDIA FastConformer-Hybrid Large (ar)
70
+ <style>
71
+ img {
72
+ display: inline-table;
73
+ vertical-align: small;
74
+ margin: 0;
75
+ padding: 0;
76
+ }
77
+ </style>
78
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-FastConformer--Transducer_CTC-lightgrey#model-badge)](#model-architecture)
79
+ | [![Model size](https://img.shields.io/badge/Params-115M-lightgrey#model-badge)](#model-architecture)
80
+ | [![Language](https://img.shields.io/badge/Language-ar-lightgrey#model-badge)](#datasets)|
81
+
82
+ This model transcribes speech in Arabic language with punctuation marks support.
83
+ It is a "large" version of FastConformer Transducer-CTC (around 115M parameters) model and is trained on two losses: Transducer (default) and CTC.
84
+ See the section [Model Architecture](#Model-Architecture) and [NeMo documentation](https://docs.nvidia.com/nemo-framework/user-guide/latest/nemotoolkit/asr/models.html#fast-conformer) for complete architecture details.
85
+ The model transcribes text in Arabic without diacritical marks and supports periods, Arabic commas and Arabic question marks.
86
+
87
+ This model is ready for commercial and non-commercial use.
88
+
89
+ ## License
90
+
91
+ 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.
92
+
93
+ ## References
94
+
95
+ [1] [Fast Conformer with Linearly Scalable Attention for Efficient Speech Recognition](https://arxiv.org/abs/2305.05084)
96
+
97
+ [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
98
+
99
+ [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
100
+
101
+ [4] [HuggingFace ASR Leaderboard](https://huggingface.co/spaces/hf-audio/open_asr_leaderboard)
102
+
103
+ <!-- ## NVIDIA NeMo: Training
104
+
105
+ To train, fine-tune or play with the model you will need to install [NVIDIA NeMo](https://github.com/NVIDIA/NeMo).
106
+ We recommend you install it after you've installed latest Pytorch version.
107
+ ```
108
+ pip install nemo_toolkit['all']
109
+ ```
110
+ -->
111
+ ## Model Architecture
112
+
113
+ FastConformer [1] is an optimized version of the Conformer model with 8x depthwise-separable convolutional downsampling.
114
+ The model is trained in a multitask setup with hybrid Transducer decoder (RNNT) and Connectionist Temporal Classification (CTC) loss.
115
+ 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).
116
+
117
+ Model utilizes a [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece) [2] tokenizer with a vocabulary size of 1024.
118
+
119
+ ### Input
120
+ - **Input Type:** Audio
121
+ - **Input Format(s):** .wav files
122
+ - **Other Properties Related to Input:** 16000 Hz Mono-channel Audio, Pre-Processing Not Needed
123
+
124
+ ### Output
125
+
126
+ This model provides transcribed speech as a string for a given audio sample.
127
+ - **Output Type**: Text
128
+ - **Output Format:** String
129
+ - **Output Parameters:** One Dimensional (1D)
130
+ - **Other Properties Related to Output:** May Need Inverse Text Normalization; Does Not Handle Special Characters; Outputs text in Arabic without diacritical marks
131
+
132
+ ## Limitations
133
+
134
+ The model is non-streaming and outputs the speech as a string without diacritical marks.
135
+ Not recommended for word-for-word transcription and punctuation as accuracy varies based on the characteristics of input audio (unrecognized word, accent, noise, speech type, and context of speech).
136
+ 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.
137
+
138
+ ## How to Use this Model
139
+
140
+ 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.
141
+
142
+ ### Automatically instantiate the model
143
+
144
+ ```python
145
+ import nemo.collections.asr as nemo_asr
146
+ asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="nvidia/stt_ar_fastconformer_hybrid_large_pc_v1.0")
147
+ ```
148
+ ### Transcribing using Python
149
+ First, let's get a sample
150
+ ```
151
+ wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
152
+ ```
153
+ Then simply do:
154
+ ```
155
+ asr_model.transcribe(['2086-149220-0033.wav'])
156
+ ```
157
+
158
+ ### Transcribing many audio files
159
+
160
+ Using Transducer mode inference:
161
+ ```shell
162
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
163
+ pretrained_name="nvidia/stt_ar_fastconformer_hybrid_large_pc_v1.0"
164
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
165
+ ```
166
+
167
+ Using CTC mode inference:
168
+ ```shell
169
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
170
+ pretrained_name="nvidia/stt_ar_fastconformer_hybrid_large_pc_v1.0"
171
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
172
+ decoder_type="ctc"
173
+ ```
174
+
175
+ ## Training
176
+
177
+ The [NVIDIA NeMo Toolkit] [3] was used for training the model for two hundred epochs.
178
+ Model is 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).
179
+
180
+ The tokenizer for these model was 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).
181
+
182
+ ## Training, Testing, and Evaluation Datasets
183
+ ### Training Datasets
184
+ The model is trained on composite dataset comprising of around 760 hours of Arabic speech:
185
+
186
+ - [Massive Arabic Speech Corpus (MASC)](https://ieee-dataport.org/open-access/masc-massive-arabic-speech-corpus) [690h]
187
+ - Data Collection Method: Automated
188
+ - Labeling Method: Automated
189
+ - [Mozilla Common Voice 17.0 Arabic](https://commonvoice.mozilla.org/en/datasets) [65h]
190
+ - Data Collection Method: by Human
191
+ - Labeling Method: by Human
192
+ - [Google Fleurs Arabic](https://huggingface.co/datasets/google/fleurs) [5h]
193
+ - Data Collection Method: by Human
194
+ - Labeling Method: by Human
195
+
196
+ ### Evaluation Datasets
197
+ - [Massive Arabic Speech Corpus (MASC)](https://ieee-dataport.org/open-access/masc-massive-arabic-speech-corpus)
198
+ - Data Collection Method: Automated
199
+ - Labeling Method: Automated
200
+ - [Mozilla Common Voice 17.0 Arabic](https://commonvoice.mozilla.org/en/datasets)
201
+ - Data Collection Method: by Human
202
+ - Labeling Method: by Human
203
+ - [Google Fleurs Arabic](https://huggingface.co/datasets/google/fleurs)
204
+ - Data Collection Method: by Human
205
+ - Labeling Method: by Human
206
+
207
+ ### Test Datasets
208
+ - [Massive Arabic Speech Corpus (MASC)](https://ieee-dataport.org/open-access/masc-massive-arabic-speech-corpus)
209
+ - Data Collection Method: Automated
210
+ - Labeling Method: Automated
211
+ - [Mozilla Common Voice 17.0 Arabic](https://commonvoice.mozilla.org/en/datasets)
212
+ - Data Collection Method: by Human
213
+ - Labeling Method: by Human
214
+ - [Google Fleurs Arabic](https://huggingface.co/datasets/google/fleurs)
215
+ - Data Collection Method: by Human
216
+ - Labeling Method: by Human
217
+
218
+ ## Software Integration
219
+
220
+ ### Supported Hardware Microarchitecture Compatibility:
221
+ - NVIDIA Ampere
222
+ - NVIDIA Blackwell
223
+ - NVIDIA Jetson
224
+ - NVIDIA Hopper
225
+ - NVIDIA Lovelace
226
+ - NVIDIA Pascal
227
+ - NVIDIA Turing
228
+ - NVIDIA Volta
229
+
230
+ ### Runtime Engine
231
+ - Nemo 2.0.0
232
+
233
+ ### Preferred Operating System
234
+ - Linux
235
+
236
+ ## Ethical Considerations
237
+ NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications.
238
+ When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
239
+
240
+ <!-- For more detailed information on ethical considerations for this model, please see the [Model Card++](https://docs.google.com/document/d/1cFbfEnlbBG_I5hTRiYuZAI1PgdPYRfsmXpE5-zJDdXU/edit?tab=t.0#heading=h.7jylogfmrbiw) Explainability, Bias, Safety & Security, and Privacy Subcards. -->
241
+
242
+ Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
243
+
244
+ ## Explainability
245
+
246
+ - High-Level Application and Domain: Automatic Speech Recognition
247
+ - - Describe how this model works: The model transcribes audio input into text for the Arabic language
248
+ - Verified to have met prescribed quality standards: Yes
249
+ - Performance Metrics: Word Error Rate (WER), Character Error Rate (CER), Real-Time Factor
250
+ - Potential Known Risks: Transcripts may not be 100% accurate. Accuracy varies based on the characteristics of input audio (Domain, Use Case, Accent, Noise, Speech Type, Context of speech, etcetera).
251
+
252
+ ### Performance
253
+
254
+ **Test Hardware:** A5000 GPU
255
+
256
+ The performance of Automatic Speech Recognition models is measured using Word Error Rate (WER) and Char Error Rate (CER).
257
+ Since this dataset is trained on multiple domains, it will generally perform well at transcribing audio in general.
258
+
259
+ The following tables summarize the performance of the available models in this collection with the Transducer decoder.
260
+ Performances of the ASR models are reported in terms of Word Error Rate (WER%) and Inverse Real-Time Factor (RTFx) with greedy decoding on test sets.
261
+
262
+ - Transducer
263
+ |**Version**|**Tokenizer**|**Vocabulary Size**|**MASC Test WER**|**MASC Test RTFx**|**MCV test WER**|**MCV test RTFx**|**FLEURS test WER**|**FLEURS test RTFx**|
264
+ |----------|-------------|-------------------|----------------|----------------|----------------|----------------|----------------|----------------|
265
+ | 2.0.0 | SentencePiece Unigram | 1024 | 11.46 | 1654.80 | 10.20| 1535.45 | 8.18 | 1144.34 |
266
+
267
+ - CTC
268
+ |**Version**|**Tokenizer**|**Vocabulary Size**|**MASC Test WER**|**MASC Test RTFx**|**MCV test WER**|**MCV test RTFx**|**FLEURS test WER**|**FLEURS test RTFx**|
269
+ |----------|-------------|-------------------|----------------|----------------|----------------|----------------|----------------|----------------|
270
+ | 2.0.0 | SentencePiece Unigram | 1024 | 12.11 | 2060.66 | 11.38 | 1891.04 | 9.23 | 1565.59 |
271
+
272
+ These are greedy WER numbers without external LM. More details on evaluation can be found at [HuggingFace ASR Leaderboard](https://huggingface.co/spaces/hf-audio/open_asr_leaderboard) [4].
273
+
274
+ ## Bias
275
+ - Was the model trained with a specific accent? No
276
+ - Have any special measures been taken to mitigate unwanted bias? No
277
+ - Participation considerations from adversely impacted groups [protected classes]
278
+ (https://www.senate.ca.gov/content/protected-classes) in model design and testing: No
279
+
280
+ ## Privacy
281
+ - Generatable or reverse engineerable personal data? No
282
+ - If applicable, was a notice provided to the individuals prior to the collection of any personal data used? Not applicable
283
+ - If personal data was collected for the development of the model, was it collected directly by NVIDIA? Not applicable
284
+ - Is there dataset provenance? Yes
285
+ - If data is labeled, was it reviewed to comply with privacy laws? Yes
286
+ - Is data compliant with data subject requests for data correction or removal, if such a request was made? No, not possible with externally-sourced data
287
+ - Is a mechanism in place to honor data subject rights of access or deletion of personal data? No
288
+ - How often is the training dataset reviewed?: Before Release
289
+
290
+ ## Safety & Security
291
+ ### Use Case Restrictions:
292
+
293
+ - Non-streaming ASR model
294
+ - Model outputs text in Arabic without diacritical marks
295
+ - Output text requires Inverse Text Normalization
296
+ - Model is noise-sensitive
297
+ - Model can have poor performance in dialectal Arabic speech
298
+
299
+ Model is not applicable for life-critical applications.
300
+
301
+ ### Access Reactions:
302
+ The Principle of Least Privilege (PoLP) is applied limiting access for dataset generation and model development. Restrictions enforce dataset access during training and dataset license constraints adhered to.
303
+
304
+ ## NVIDIA Riva: Deployment
305
+
306
+ [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.
307
+ Additionally, Riva provides:
308
+
309
+ * 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
310
+ * 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
311
+ * Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
312
+
313
+ Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
314
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
stt_ar_fastconformer_hybrid_large_pc_v1.0.nemo ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5c50c74ec1860b5f68fce310a89bb9ec2034dfdd818374b2ab2f43f17856d86
3
+ size 424164993