Automatic Speech Recognition
NeMo
PyTorch
English
speech
streaming
audio
Transducer
Conformer
CTC
NeMo
Eval Results
vnoroozi commited on
Commit
4fb986e
1 Parent(s): 982a5ce

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +129 -3
README.md CHANGED
@@ -64,11 +64,137 @@ img {
64
  | [![Model size](https://img.shields.io/badge/Params-114M-lightgrey#model-badge)](#model-architecture)
65
  | [![Language](https://img.shields.io/badge/Language-en--US-lightgrey#model-badge)](#datasets)
66
 
67
-
68
- This model transcribes speech in lower case English alphabet along with spaces and apostrophes.
69
- It is an "extra-large" versions of Conformer-Transducer (around 600M parameters) model.
70
  See the [model architecture](#model-architecture) section and [NeMo documentation](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/models.html#conformer-transducer) for complete architecture details.
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  ## NVIDIA NeMo: Training
73
 
74
  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.
 
64
  | [![Model size](https://img.shields.io/badge/Params-114M-lightgrey#model-badge)](#model-architecture)
65
  | [![Language](https://img.shields.io/badge/Language-en--US-lightgrey#model-badge)](#datasets)
66
 
67
+ This collection contains large size versions of cache-aware FastConformer-Hybrid (around 114M parameters) with multiple look-ahead support, trained on a large scale english speech.
68
+ These models are trained for streaming ASR which be used for streaming applications with a variety of latencies.
69
+ All models are hybrid with both Transducer and CTC decoders.
70
  See the [model architecture](#model-architecture) section and [NeMo documentation](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/models.html#conformer-transducer) for complete architecture details.
71
 
72
+
73
+ ## Model Architecture
74
+
75
+ FastConformer [4] is an optimized version of the Conformer model [1]. 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). You may find more on how to switch between the Transducer and CTC decoders in the documentations.
76
+
77
+ These models are cache-aware versions of Hybrid FastConfomer which are trianed for streaming ASR. You may find more info on cache-aware models here: [Cache-aware Streaming Conformer](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/models.html#cache-aware-streaming-conformer). The models are trained with multiple look-aheads which makes the model to be able to support different latencies. To learn on how to switch between different look-aheads, you may read the documentations on the cache-aware models.
78
+
79
+
80
+ ## Training
81
+
82
+ 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_cache_aware_streaming/fastconformer_hybrid_transducer_ctc_bpe_streaming.yaml). The SentencePiece tokenizers [2] 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).
83
+
84
+
85
+ ### Datasets
86
+
87
+ All the models in this collection are trained on a composite dataset (NeMo ASRSET) comprising of several thousand hours of English speech:
88
+
89
+ - Librispeech 960 hours of English speech
90
+ - Fisher Corpus
91
+ - Switchboard-1 Dataset
92
+ - WSJ-0 and WSJ-1
93
+ - National Speech Corpus (Part 1, Part 6)
94
+ - VCTK
95
+ - VoxPopuli (EN)
96
+ - Europarl-ASR (EN)
97
+ - Multilingual Librispeech (MLS EN) - 2,000 hours subset
98
+ - Mozilla Common Voice (v7.0)
99
+ - People's Speech - 12,000 hrs subset
100
+
101
+ Note: older versions of the model may have trained on smaller set of datasets.
102
+
103
+ ## Performance
104
+
105
+ The list of the available models in this collection is shown in the following tables for both CTC and Transducer decoders. Performances of the ASR models are reported in terms of Word Error Rate (WER%) with greedy decoding.
106
+
107
+ ### Transducer Decoder
108
+
109
+ | Version | Tokenizer | Vocabulary Size | att_context_sizes | LS test-other ([70,13]-1040ms) | LS test-other ([70,6]-480ms) | LS test-other ([70,1]-80ms) | LS test-other ([70,0]-0s) | Train Dataset |
110
+ |-----------|------------|----------|-----------------------|-----------------------|---------------|------------|-----------|----------------|
111
+ | 1.20.0 | SPE Unigram| 1024 | [[70,13],[70,6],[70,1],[70,0]] | 5.4 | 5.7 | 6.4 | 7.0 | NeMo ASRSET 3.0 |
112
+
113
+ ### CTC Decoder
114
+
115
+ | Version | Tokenizer | Vocabulary Size | att_context_sizes | LS test-other ([70,13]-1040ms) | LS test-other ([70,6]-480ms) | LS test-other ([70,1]-80ms) | LS test-other ([70,0]-0s) | Train Dataset |
116
+ |-----------|------------|----------|--------|---------------|---------------|------------|-----------|----------------|
117
+ | 1.20.0 | SPE Unigram| 1024 | [[70,13],[70,6],[70,1],[70,0]] | 6.2 | 6.7 | 7.8 | 8.4 | NeMo ASRSET 3.0 |
118
+
119
+
120
+ ## How to Use this Model
121
+
122
+ The model is available for use in the NeMo toolkit [3], and can be used as a pre-trained checkpoint for streaming or for fine-tuning on another dataset.
123
+
124
+ 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.
125
+ ```
126
+ pip install nemo_toolkit['all']
127
+ '''
128
+ '''
129
+ (if it causes an error):
130
+ pip install nemo_toolkit[all]
131
+ ```
132
+
133
+
134
+ You may use this script to simulate streaming ASR with these models: [cache-aware streaming simulation](https://github.com/NVIDIA/NeMo/blob/main/examples/asr/asr_cache_aware_streaming/speech_to_text_cache_aware_streaming_infer.py).
135
+ You may use --att_context_size to set the context size otherwise the default which is the first context size in the list is going to be used.
136
+
137
+ ### Automatically load the model from NGC
138
+
139
+ ```python
140
+ import nemo.collections.asr as nemo_asr
141
+ asr_model = nemo_asr.models.EncDecHybridRNNTCTCBPEModel.from_pretrained(model_name="stt_en_fastconformer_hybrid_large_streaming_multi")
142
+ ```
143
+
144
+ ### Transcribing text with this model
145
+
146
+ Using Transducer mode inference:
147
+
148
+ ```shell
149
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py \
150
+ pretrained_name="stt_en_fastconformer_hybrid_large_streaming_multi" \
151
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
152
+ ```
153
+
154
+ Using CTC mode inference:
155
+
156
+ ```shell
157
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py \
158
+ pretrained_name="stt_en_fastconformer_hybrid_large_streaming_multi" \
159
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>" \
160
+ decoder_type="ctc"
161
+ ```
162
+
163
+ To change between different look-aheads you may set att_context_size of the script transcribe_speech.py as the following:
164
+
165
+ ```shell
166
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py \
167
+ pretrained_name="stt_en_fastconformer_hybrid_large_streaming_multi" \
168
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>" \
169
+ att_context_size=[70,0]
170
+ ```
171
+
172
+ ### Input
173
+
174
+ This model accepts 16000 KHz Mono-channel Audio (wav files) as input.
175
+
176
+ ### Output
177
+
178
+ This model provides transcribed speech as a string for a given audio sample.
179
+
180
+ ## Limitations
181
+
182
+ 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.
183
+
184
+
185
+ ## References
186
+
187
+
188
+ [1] [Conformer: Convolution-augmented Transformer for Speech Recognition](https://arxiv.org/abs/2005.08100)
189
+
190
+ [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
191
+
192
+ [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
193
+
194
+ [4] [Fast Conformer with Linearly Scalable Attention for Efficient Speech Recognition](https://arxiv.org/abs/2305.05084)
195
+
196
+
197
+
198
  ## NVIDIA NeMo: Training
199
 
200
  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.