chenzhehuai commited on
Commit
c0f9782
·
1 Parent(s): b85fef4

Update README.md

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