steveheh commited on
Commit
f05d889
1 Parent(s): 545f41c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +172 -0
README.md CHANGED
@@ -1,3 +1,175 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - ca
4
+ library_name: nemo
5
+ datasets:
6
+ - Mozilla Common Voice 9.0
7
+ thumbnail: null
8
+ tags:
9
+ - automatic-speech-recognition
10
+ - speech
11
+ - audio
12
+ - CTC
13
+ - Conformer
14
+ - Transformer
15
+ - pytorch
16
+ - NeMo
17
+ - hf-asr-leaderboard
18
+ - Riva
19
  license: cc-by-4.0
20
+ widget:
21
+ - example_title: Librispeech sample 1
22
+ src: https://cdn-media.huggingface.co/speech_samples/sample1.flac
23
+ - example_title: Librispeech sample 2
24
+ src: https://cdn-media.huggingface.co/speech_samples/sample2.flac
25
+ model-index:
26
+ - name: stt_ca_conformer_ctc_large
27
+ results:
28
+ - task:
29
+ name: Automatic Speech Recognition
30
+ type: automatic-speech-recognition
31
+ dataset:
32
+ name: LibriSpeech (clean)
33
+ type: librispeech_asr
34
+ config: clean
35
+ split: test
36
+ args:
37
+ language: en
38
+ metrics:
39
+ - name: Test WER
40
+ type: wer
41
+ value: 2.2
42
+
43
  ---
44
+
45
+ # NVIDIA Conformer-CTC Large (Catalan)
46
+
47
+ <style>
48
+ img {
49
+ display: inline;
50
+ }
51
+ </style>
52
+
53
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-Conformer--CTC-lightgrey#model-badge)](#model-architecture)
54
+ | [![Model size](https://img.shields.io/badge/Params-120M-lightgrey#model-badge)](#model-architecture)
55
+ | [![Language](https://img.shields.io/badge/Language-ca-lightgrey#model-badge)](#datasets)
56
+ | [![Riva Compatible](https://img.shields.io/badge/NVIDIA%20Riva-compatible-brightgreen#model-badge)](#deployment-with-nvidia-riva) |
57
+
58
+
59
+ This model transcribes speech into lowercase Catalan alphabet including spaces, dashes and apostrophes, and is trained on around 1023 hours of Catalan speech data.
60
+ It is a non-autoregressive "large" variant of Conformer, with around 120 million parameters.
61
+ 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-ctc) for complete architecture details.
62
+ It is also compatible with NVIDIA Riva for [production-grade server deployments](#deployment-with-nvidia-riva).
63
+
64
+
65
+ ## Usage
66
+
67
+ 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.
68
+
69
+ 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.
70
+
71
+ ```
72
+ pip install nemo_toolkit['all']
73
+ ```
74
+
75
+ ### Automatically instantiate the model
76
+
77
+ ```python
78
+ import nemo.collections.asr as nemo_asr
79
+ asr_model = nemo_asr.models.EncDecCTCModelBPE.from_pretrained("nvidia/stt_en_conformer_ctc_large")
80
+ ```
81
+
82
+ ### Transcribing using Python
83
+ First, let's get a sample
84
+ ```
85
+ wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
86
+ ```
87
+ Then simply do:
88
+ ```
89
+ asr_model.transcribe(['2086-149220-0033.wav'])
90
+ ```
91
+
92
+ ### Transcribing many audio files
93
+
94
+ ```shell
95
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
96
+ pretrained_name="nvidia/stt_en_conformer_ctc_large"
97
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
98
+ ```
99
+
100
+ ### Input
101
+
102
+ This model accepts 16000 kHz Mono-channel Audio (wav files) as input.
103
+
104
+ ### Output
105
+
106
+ This model provides transcribed speech as a string for a given audio sample.
107
+
108
+ ## Model Architecture
109
+
110
+ Conformer-CTC model is a non-autoregressive variant of Conformer model [1] for Automatic Speech Recognition which uses CTC loss/decoding instead of Transducer. You may find more info on the detail of this model here: [Conformer-CTC Model](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/models.html#conformer-ctc).
111
+
112
+ ## Training
113
+
114
+ 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_ctc/speech_to_text_ctc_bpe.py) and this [base config](https://github.com/NVIDIA/NeMo/blob/main/examples/asr/conf/conformer/conformer_ctc_bpe.yaml).
115
+
116
+ 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).
117
+
118
+ The checkpoint of the language model used as the neural rescorer can be found [here](https://ngc.nvidia.com/catalog/models/nvidia:nemo:asrlm_en_transformer_large_ls). You may find more info on how to train and use language models for ASR models here: [ASR Language Modeling](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/asr_language_modeling.html)
119
+
120
+ ### Datasets
121
+
122
+ All the models in this collection are trained on a composite dataset (NeMo ASRSET) comprising of several thousand hours of English speech:
123
+
124
+ - Librispeech 960 hours of English speech
125
+ - Fisher Corpus
126
+ - Switchboard-1 Dataset
127
+ - WSJ-0 and WSJ-1
128
+ - National Speech Corpus (Part 1, Part 6)
129
+ - VCTK
130
+ - VoxPopuli (EN)
131
+ - Europarl-ASR (EN)
132
+ - Multilingual Librispeech (MLS EN) - 2,000 hours subset
133
+ - Mozilla Common Voice (v7.0)
134
+
135
+ Note: older versions of the model may have trained on smaller set of datasets.
136
+
137
+ ## Performance
138
+
139
+ The list of the available models in this collection is shown in the following table. Performances of the ASR models are reported in terms of Word Error Rate (WER%) with greedy decoding.
140
+
141
+ | Version | Tokenizer | Vocabulary Size | LS test-other | LS test-clean | WSJ Eval92 | WSJ Dev93 | NSC Part 1 | MLS Test | MLS Dev | MCV Test 6.1 |Train Dataset |
142
+ |---------|-----------------------|-----------------|---------------|---------------|------------|-----------|-------|------|-----|-------|---------|
143
+ | 1.6.0 | SentencePiece Unigram | 128 | 4.3 | 2.2 | 2.0 | 2.9 | 7.0 | 7.2 | 6.5 | 8.0 | NeMo ASRSET 2.0 |
144
+
145
+ While deploying with [NVIDIA Riva](https://developer.nvidia.com/riva), you can combine this model with external language models to further improve WER. The WER(%) of the latest model with different language modeling techniques are reported in the following table.
146
+
147
+ | Language Modeling | Training Dataset | LS test-other | LS test-clean | Comment |
148
+ |-------------------------------------|-------------------------|---------------|---------------|---------------------------------------------------------|
149
+ |N-gram LM | LS Train + LS LM Corpus | 3.5 | 1.8 | N=10, beam_width=128, n_gram_alpha=1.0, n_gram_beta=1.0 |
150
+ |Neural Rescorer(Transformer) | LS Train + LS LM Corpus | 3.4 | 1.7 | N=10, beam_width=128 |
151
+ |N-gram + Neural Rescorer(Transformer)| LS Train + LS LM Corpus | 3.2 | 1.8 | N=10, beam_width=128, n_gram_alpha=1.0, n_gram_beta=1.0 |
152
+
153
+
154
+ ## Limitations
155
+
156
+ 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. The model might also perform worse for accented speech.
157
+
158
+ ## Deployment with NVIDIA Riva
159
+
160
+ For the best real-time accuracy, latency, and throughput, deploy the model with [NVIDIA Riva](https://developer.nvidia.com/riva), an accelerated speech AI SDK deployable on-prem, in all clouds, multi-cloud, hybrid, at the edge, and embedded.
161
+ Additionally, Riva provides:
162
+
163
+ * 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
164
+ * 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
165
+ * Streaming speech recognition, Kubernetes compatible scaling, and Enterprise-grade support
166
+
167
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
168
+
169
+ ## References
170
+
171
+ - [1] [Conformer: Convolution-augmented Transformer for Speech Recognition](https://arxiv.org/abs/2005.08100)
172
+
173
+ - [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
174
+
175
+ - [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)