bene-ges commited on
Commit
86ce169
1 Parent(s): 34379dc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +140 -0
README.md CHANGED
@@ -1,3 +1,143 @@
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
+ - CTC
13
+ - Conformer
14
+ - Transformer
15
+ - pytorch
16
+ - NeMo
17
+ - hf-asr-leaderboard
18
+ - Riva
19
  license: cc-by-4.0
20
+ model-index:
21
+ - name: stt_rw_conformer_ctc_large
22
+ results:
23
+ - task:
24
+ name: Automatic Speech Recognition
25
+ type: automatic-speech-recognition
26
+ dataset:
27
+ name: Mozilla Common Voice 9.0
28
+ type: mozilla-foundation/common_voice_9_0
29
+ config: rw
30
+ split: test
31
+ args:
32
+ language: rw
33
+ metrics:
34
+ - name: Test WER
35
+ type: wer
36
+ value: 18.22
37
  ---
38
+
39
+ # NVIDIA Conformer-CTC Large (Kinyarwanda)
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-rw-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 Latin alphabet including spaces, and apostroph, and is trained on around 2000 hours of Kinyarwanda 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
+ It is also compatible with NVIDIA Riva for [production-grade server deployments](#deployment-with-nvidia-riva).
57
+
58
+
59
+ ## Usage
60
+
61
+ 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.
62
+
63
+ 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
+
65
+ ```
66
+ pip install nemo_toolkit['all']
67
+ ```
68
+
69
+ ### Automatically instantiate the model
70
+
71
+ ```python
72
+ import nemo.collections.asr as nemo_asr
73
+ asr_model = nemo_asr.models.EncDecCTCModelBPE.from_pretrained("nvidia/stt_rw_conformer_ctc_large")
74
+ ```
75
+
76
+ ### Transcribing using Python
77
+ First, let's get a sample
78
+ ```
79
+ wget https://dldata-public.s3.us-east-2.amazonaws.com/2086-149220-0033.wav
80
+ ```
81
+ Then simply do:
82
+ ```
83
+ asr_model.transcribe(['2086-149220-0033.wav'])
84
+ ```
85
+
86
+ ### Transcribing many audio files
87
+
88
+ ```shell
89
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
90
+ pretrained_name="nvidia/stt_rw_conformer_ctc_large"
91
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
92
+ ```
93
+
94
+ ### Input
95
+
96
+ This model accepts 16 kHz mono-channel Audio (wav files) as input.
97
+
98
+ ### Output
99
+
100
+ This model provides transcribed speech as a string for a given audio sample.
101
+
102
+ ## Model Architecture
103
+
104
+ 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).
105
+
106
+ ## Training
107
+
108
+ 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).
109
+
110
+ 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).
111
+
112
+ The vocabulary we use contains 28 characters:
113
+ ```python
114
+ [' ', "'", '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']
115
+ ```
116
+
117
+ Full config can be found inside the .nemo files.
118
+
119
+ ### Datasets
120
+
121
+ 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.
122
+
123
+ ## Performance
124
+
125
+ 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.
126
+
127
+ | Version | Tokenizer | Vocabulary Size | Dev WER| Test WER| Train Dataset |
128
+ |---------|-----------------------|-----------------|-----|------|-----------------|
129
+ | 1.11.0 | SentencePiece BPE, maxlen=2 | 128 |15.16 | 18.22 | MCV-9.0 Train set |
130
+
131
+ ## Limitations
132
+ 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.
133
+ ## Deployment with NVIDIA Riva
134
+ 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.
135
+ Additionally, Riva provides:
136
+ * 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
137
+ * 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
138
+ * Streaming speech recognition, Kubernetes compatible scaling, and Enterprise-grade support
139
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
140
+ ## References
141
+ - [1] [Conformer: Convolution-augmented Transformer for Speech Recognition](https://arxiv.org/abs/2005.08100)
142
+ - [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
143
+ - [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)