kunaldhawan commited on
Commit
9fd5c20
1 Parent(s): 442b584

Added BE model card

Browse files
Files changed (1) hide show
  1. README.md +177 -0
README.md CHANGED
@@ -1,3 +1,180 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - be
4
+ library_name: nemo
5
+ datasets:
6
+ - mozilla-foundation/common_voice_12_0
7
+ thumbnail: null
8
+ tags:
9
+ - automatic-speech-recognition
10
+ - speech
11
+ - audio
12
+ - Transducer
13
+ - FastConformer
14
+ - CTC
15
+ - Transformer
16
+ - pytorch
17
+ - NeMo
18
+ - hf-asr-leaderboard
19
  license: cc-by-4.0
20
+ model-index:
21
+ - name: stt_de_fastconformer_hybrid_large_pc
22
+ results:
23
+ - task:
24
+ name: Automatic Speech Recognition
25
+ type: automatic-speech-recognition
26
+ dataset:
27
+ name: common-voice-12-0
28
+ type: mozilla-foundation/common_voice_12_0
29
+ config: be
30
+ split: test
31
+ args:
32
+ language: be
33
+ metrics:
34
+ - name: Test WER
35
+ type: wer
36
+ value: 2.72
37
+ - task:
38
+ name: Automatic Speech Recognition
39
+ type: automatic-speech-recognition
40
+ dataset:
41
+ name: common-voice-12-0
42
+ type: mozilla-foundation/common_voice_12_0
43
+ config: Belarusian P&C
44
+ split: test
45
+ args:
46
+ language: be
47
+ metrics:
48
+ - name: Test WER P&C
49
+ type: wer
50
+ value: 3.87
51
  ---
52
+
53
+ # NVIDIA FastConformer-Hybrid Large (be)
54
+
55
+ <style>
56
+ img {
57
+ display: inline;
58
+ }
59
+ </style>
60
+
61
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-FastConformer--Transducer_CTC-lightgrey#model-badge)](#model-architecture)
62
+ | [![Model size](https://img.shields.io/badge/Params-115M-lightgrey#model-badge)](#model-architecture)
63
+ | [![Language](https://img.shields.io/badge/Language-be-lightgrey#model-badge)](#datasets)
64
+
65
+
66
+ This model transcribes speech in upper and lower case Belarusian alphabet along with spaces, periods, commas, and question marks.
67
+ 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.
68
+ 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.
69
+
70
+ ## NVIDIA NeMo: Training
71
+
72
+ 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.
73
+ ```
74
+ pip install nemo_toolkit['all']
75
+ ```
76
+
77
+ ## How to Use this Model
78
+
79
+ 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.
80
+
81
+ ### Automatically instantiate the model
82
+
83
+ ```python
84
+ import nemo.collections.asr as nemo_asr
85
+ asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="nvidia/stt_be_fastconformer_hybrid_large_pc")
86
+ ```
87
+
88
+ ### Transcribing using Python
89
+ First, let's get a sample
90
+ ```
91
+ wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
92
+ ```
93
+ Then simply do:
94
+ ```
95
+ asr_model.transcribe(['2086-149220-0033.wav'])
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_be_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_be_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 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).
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
+ All the models in this collection are trained on MCV12 BY corpus comprising of 1500 hours of Belarusian speech.
136
+
137
+ ## Performance
138
+
139
+ 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.
140
+
141
+ 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.
142
+
143
+
144
+ a) On data without Punctuation and Capitalization with Transducer decoder
145
+ | **Version** | **Tokenizer** | **Vocabulary Size** | **MCV12 DEV** | **MCV12 TEST** |
146
+ |:-----------:|:---------------------:|:-------------------:|:-------------:|:--------------:|
147
+ | 1.18.0 | SentencePiece Unigram | 1024 | 2.68 | 2.72 |
148
+
149
+
150
+ b) On data with Punctuation and Capitalization with Transducer decoder
151
+ | **Version** | **Tokenizer** | **Vocabulary Size** | **MCV12 DEV** | **MCV12 TEST** |
152
+ |:-----------:|:---------------------:|:-------------------:|:-------------:|:--------------:|
153
+ | 1.18.0 | SentencePiece Unigram | 1024 | 3.84 | 3.87 |
154
+
155
+
156
+ ## Limitations
157
+ 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.
158
+
159
+ ## NVIDIA Riva: Deployment
160
+
161
+ [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.
162
+ Additionally, Riva provides:
163
+
164
+ * 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
165
+ * 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
166
+ * Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
167
+
168
+ Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
169
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
170
+
171
+ ## References
172
+ [1] [Conformer: Convolution-augmented Transformer for Speech Recognition](https://arxiv.org/abs/2005.08100)
173
+
174
+ [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
175
+
176
+ [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
177
+
178
+ ## Licence
179
+
180
+ 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.