bene-ges commited on
Commit
e7bb18e
1 Parent(s): 6206460

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +148 -0
README.md CHANGED
@@ -1,3 +1,151 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - rw
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_rw_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: rw
29
+ split: test
30
+ args:
31
+ language: rw
32
+ metrics:
33
+ - name: Test WER
34
+ type: wer
35
+ value: 16.19
36
  ---
37
+
38
+ # NVIDIA Conformer-Transducer Large (Kinyarwanda)
39
+
40
+ <style>
41
+ img {
42
+ display: inline;
43
+ }
44
+ </style>
45
+
46
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-Conformer--Transducer-lightgrey#model-badge)](#model-architecture)
47
+ | [![Model size](https://img.shields.io/badge/Params-120M-lightgrey#model-badge)](#model-architecture)
48
+ | [![Language](https://img.shields.io/badge/Language-rw-lightgrey#model-badge)](#datasets)
49
+
50
+
51
+ This model transcribes speech into lowercase Latin alphabet including space and apostrophe, and is trained on around 2000 hours of Kinyarwanda speech data.
52
+ It is a non-autoregressive "large" variant of Conformer, with around 120 million parameters.
53
+ 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.
54
+
55
+
56
+ ## Usage
57
+
58
+ 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.
59
+
60
+ 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.
61
+
62
+ ```
63
+ pip install nemo_toolkit['all']
64
+ ```
65
+
66
+ ### Automatically instantiate the model
67
+
68
+ ```python
69
+ import nemo.collections.asr as nemo_asr
70
+ asr_model = nemo_asr.models.EncDecRNNTBPEModel.from_pretrained("nvidia/stt_rw_conformer_transducer_large")
71
+ ```
72
+
73
+ ### Transcribing using Python
74
+ First, let's get a sample
75
+ ```
76
+ wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
77
+ ```
78
+ Then simply do:
79
+ ```
80
+ asr_model.transcribe(['2086-149220-0033.wav'])
81
+ ```
82
+
83
+ ### Transcribing many audio files
84
+
85
+ ```shell
86
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
87
+ pretrained_name="nvidia/stt_rw_conformer_transducer_large"
88
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
89
+ ```
90
+
91
+ ### Input
92
+
93
+ This model accepts 16 kHz mono-channel Audio (wav files) as input.
94
+
95
+ ### Output
96
+
97
+ This model provides transcribed speech as a string for a given audio sample.
98
+
99
+ ## Model Architecture
100
+
101
+ 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).
102
+
103
+ ## Training
104
+
105
+ 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_transducer/speech_to_text_rnnt_bpe.py) and this [base config](https://github.com/NVIDIA/NeMo/blob/main/examples/asr/conf/conformer/conformer_transducer_bpe.yaml).
106
+
107
+ 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).
108
+
109
+ The vocabulary we use contains 28 characters:
110
+ ```python
111
+ [' ', "'", 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
112
+ ```
113
+
114
+ Full config can be found inside the .nemo files.
115
+
116
+ ### Datasets
117
+
118
+ All the models in this collection are trained on MCV-9.0 Kinyarwanda dataset, which contains around 2000 hours training, 32 hours of development and 32 hours of testing speech audios.
119
+
120
+ ## Performance
121
+
122
+ 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.
123
+
124
+ | Version | Tokenizer | Vocabulary Size | Dev WER| Test WER| Train Dataset |
125
+ |---------|-----------------------|-----------------|--------|---------|-----------------|
126
+ | 1.11.0 | SentencePiece BPE, maxlen=4 | 1024 |13.82 | 16.19 | MCV-9.0 Train set|
127
+
128
+
129
+ ## Limitations
130
+
131
+ 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.
132
+
133
+ ## Deployment with NVIDIA Riva
134
+
135
+ [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.
136
+ Additionally, Riva provides:
137
+
138
+ * 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
139
+ * 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
140
+ * Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
141
+
142
+ Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
143
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
144
+
145
+ ## References
146
+
147
+ - [1] [Conformer: Convolution-augmented Transformer for Speech Recognition](https://arxiv.org/abs/2005.08100)
148
+
149
+ - [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
150
+
151
+ - [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)