steveheh commited on
Commit
56c6097
1 Parent(s): 3a5528a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +158 -0
README.md CHANGED
@@ -1,3 +1,161 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - ca
4
+ library_name: nemo
5
+ datasets:
6
+ - mozilla-foundation/common_voice_9_0
7
+ thumbnail: null
8
+ tags:
9
+ - automatic-speech-recognition
10
+ - speech
11
+ - audio
12
+ - Transducer
13
+ - Conformer
14
+ - Transformer
15
+ - pytorch
16
+ - NeMo
17
+ - hf-asr-leaderboard
18
  license: cc-by-4.0
19
+ model-index:
20
+ - name: stt_ca_conformer_transducer_large
21
+ results:
22
+ - task:
23
+ name: Automatic Speech Recognition
24
+ type: automatic-speech-recognition
25
+ dataset:
26
+ name: Mozilla Common Voice 9.0
27
+ type: mozilla-foundation/common_voice_9_0
28
+ config: ca
29
+ split: test
30
+ args:
31
+ language: ca
32
+ metrics:
33
+ - name: Test WER
34
+ type: wer
35
+ value: 3.85
36
+
37
  ---
38
+
39
+ # NVIDIA Conformer-Transducer Large (Catalan)
40
+
41
+ <style>
42
+ img {
43
+ display: inline;
44
+ }
45
+ </style>
46
+
47
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-Conformer--CTC-lightgrey#model-badge)](#model-architecture)
48
+ | [![Model size](https://img.shields.io/badge/Params-120M-lightgrey#model-badge)](#model-architecture)
49
+ | [![Language](https://img.shields.io/badge/Language-ca-lightgrey#model-badge)](#datasets)
50
+ | [![Riva Compatible](https://img.shields.io/badge/NVIDIA%20Riva-compatible-brightgreen#model-badge)](#deployment-with-nvidia-riva) |
51
+
52
+
53
+ This model transcribes speech into lowercase Catalan alphabet including spaces, dashes and apostrophes, and is trained on around 1023 hours of Catalan speech data.
54
+ It is a non-autoregressive "large" variant of Conformer, with around 120 million parameters.
55
+ 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.
56
+
57
+
58
+ ## Usage
59
+
60
+ 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.
61
+
62
+ 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.
63
+
64
+ ```
65
+ pip install nemo_toolkit['all']
66
+ ```
67
+
68
+ ### Automatically instantiate the model
69
+
70
+ ```python
71
+ import nemo.collections.asr as nemo_asr
72
+ asr_model = nemo_asr.models.EncDecCTCModelBPE.from_pretrained("nvidia/stt_ca_conformer_transducer_large")
73
+ ```
74
+
75
+ ### Transcribing using Python
76
+ First, let's get a sample
77
+ ```
78
+ wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
79
+ ```
80
+ Then simply do:
81
+ ```
82
+ asr_model.transcribe(['2086-149220-0033.wav'])
83
+ ```
84
+
85
+ ### Transcribing many audio files
86
+
87
+ ```shell
88
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
89
+ pretrained_name="nvidia/stt_ca_conformer_transducer_large"
90
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
91
+ ```
92
+
93
+ ### Input
94
+
95
+ This model accepts 16000 kHz mono-channel Audio (wav files) as input.
96
+
97
+ ### Output
98
+
99
+ This model provides transcribed speech as a string for a given audio sample.
100
+
101
+ ## Model Architecture
102
+
103
+ Conformer-Transducer model is an autoregressive variant of Conformer model [1] for Automatic Speech Recognition which uses Transducer loss/decoding. You may find more info on the detail of this model here: [Conformer-Transducer Model](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/models.html).
104
+
105
+ ## Training
106
+
107
+ 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).
108
+
109
+ 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).
110
+
111
+ The vocabulary we use contains 44 characters:
112
+ ```python
113
+ ['s','e','r','v','i','d','p','o','g','a','m','t','u','l','f','c','z','b','q','n','é',"'",'x','ó','è','h','í','ü','j','à','ï','w','k','y','ç','ú','ò','á','ı','·','ñ','—','–','-']
114
+ ```
115
+
116
+ Full config can be found inside the .nemo files.
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 MCV-9.0 Catalan dataset, which contains around 1203 hours training, 28 hours of development and 27 hours of testing speech audios.
123
+
124
+ ## Performance
125
+
126
+ 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.
127
+
128
+ | Version | Tokenizer | Vocabulary Size | Dev WER| Test WER| Train Dataset |
129
+ |---------|-----------------------|-----------------|--------|---------|-----------------|
130
+ | 1.11.0 | SentencePiece Unigram | 128 |4.43 | 3.85 | MCV-9.0 Train set|
131
+
132
+ You may use language models (LMs) and beam search to improve the accuracy of the models, as reported in the follwoing table.
133
+
134
+ | Language Model | Test WER | Test WER w/ Oracle LM | Train Dataset | Settings |
135
+ |----------------|----------|-----------------------|------------------|-------------------------------------------------------|
136
+ | N-gram LM | 3.83 | 3.40 |MCV-9.0 Train set |N=6, beam_width=8, ngram_alpha=1, ngram_beta=0 |
137
+
138
+
139
+ ## Limitations
140
+
141
+ 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.
142
+
143
+ ## Deployment with NVIDIA Riva
144
+
145
+ [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.
146
+ Additionally, Riva provides:
147
+
148
+ * 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
149
+ * 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
150
+ * Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
151
+
152
+ Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
153
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
154
+
155
+ ## References
156
+
157
+ - [1] [Conformer: Convolution-augmented Transformer for Speech Recognition](https://arxiv.org/abs/2005.08100)
158
+
159
+ - [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
160
+
161
+ - [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)