imedennikov commited on
Commit
e74901b
1 Parent(s): 93d61ec

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +215 -3
README.md CHANGED
@@ -1,3 +1,215 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ja
4
+ library_name: nemo
5
+ datasets:
6
+ - reazon-research/reazonspeech
7
+
8
+ thumbnail: null
9
+ tags:
10
+ - automatic-speech-recognition
11
+ - speech
12
+ - audio
13
+ - Transducer
14
+ - TDT
15
+ - CTC
16
+ - FastConformer
17
+ - Conformer
18
+ - pytorch
19
+ - NeMo
20
+ license: cc-by-4.0
21
+ model-index:
22
+ - name: ja-parakeet-tdt_ctc-0.6b
23
+ results:
24
+ - task:
25
+ name: Automatic Speech Recognition
26
+ type: automatic-speech-recognition
27
+ dataset:
28
+ name: JSUT basic5000
29
+ type: japanese-asr/ja_asr.jsut_basic5000
30
+ split: test
31
+ args:
32
+ language: ja
33
+ metrics:
34
+ - name: Test CER
35
+ type: cer
36
+ value: 6.4
37
+ - task:
38
+ name: Automatic Speech Recognition
39
+ type: automatic-speech-recognition
40
+ dataset:
41
+ name: Mozilla Common Voice 8.0
42
+ type: mozilla-foundation/common_voice_8_0
43
+ config: ja
44
+ split: test
45
+ args:
46
+ language: ja
47
+ metrics:
48
+ - name: Test CER
49
+ type: cer
50
+ value: 7.1
51
+ - task:
52
+ name: Automatic Speech Recognition
53
+ type: automatic-speech-recognition
54
+ dataset:
55
+ name: Mozilla Common Voice 16.1
56
+ type: mozilla-foundation/common_voice_16_1
57
+ config: ja
58
+ split: dev
59
+ args:
60
+ language: ja
61
+ metrics:
62
+ - name: Test CER
63
+ type: cer
64
+ value: 10.1
65
+ - task:
66
+ name: Automatic Speech Recognition
67
+ type: automatic-speech-recognition
68
+ dataset:
69
+ name: Mozilla Common Voice 16.1
70
+ type: mozilla-foundation/common_voice_16_1
71
+ config: ja
72
+ split: test
73
+ args:
74
+ language: ja
75
+ metrics:
76
+ - name: Test CER
77
+ type: cer
78
+ value: 13.2
79
+ - task:
80
+ name: Automatic Speech Recognition
81
+ type: automatic-speech-recognition
82
+ dataset:
83
+ name: TEDxJP-10k
84
+ type: laboroai/TEDxJP-10K
85
+ split: test
86
+ args:
87
+ language: ja
88
+ metrics:
89
+ - name: Test CER
90
+ type: cer
91
+ value: 9.0
92
+
93
+ metrics:
94
+ - cer
95
+ pipeline_tag: automatic-speech-recognition
96
+ ---
97
+
98
+ # Parakeet TDT-CTC 0.6B (ja)
99
+
100
+ <style>
101
+ img {
102
+ display: inline;
103
+ }
104
+ </style>
105
+
106
+ [![Model architecture](https://img.shields.io/badge/Model_Arch-FastConformer--TDT--CTC-lightgrey#model-badge)](#model-architecture)
107
+ | [![Model size](https://img.shields.io/badge/Params-0.6B-lightgrey#model-badge)](#model-architecture)
108
+ | [![Language](https://img.shields.io/badge/Language-ja-lightgrey#model-badge)](#datasets)
109
+
110
+
111
+ `ja-parakeet-tdt_ctc-0.6b` is an ASR model that transcribes Japanese speech with Punctuations. This model is developed by [NVIDIA NeMo](https://github.com/NVIDIA/NeMo) team.
112
+ It is an XL version of Hybrid FastConformer [1] TDT-CTC [2] (around 0.6B parameters) model.
113
+ See the [model architecture](#model-architecture) section and [NeMo documentation](https://docs.nvidia.com/deeplearning/nemo/user-guide/docs/en/main/asr/models.html#fast-conformer) for complete architecture details.
114
+
115
+ ## NVIDIA NeMo: Training
116
+
117
+ 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.
118
+ ```
119
+ pip install nemo_toolkit['all']
120
+ ```
121
+
122
+ ## How to Use this Model
123
+
124
+ 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.
125
+
126
+ ### Automatically instantiate the model
127
+
128
+ ```python
129
+ import nemo.collections.asr as nemo_asr
130
+ asr_model = nemo_asr.models.ASRModel.from_pretrained(model_name="nvidia/ja-parakeet-tdt_ctc-0.6b")
131
+ ```
132
+
133
+ ### Transcribing using Python
134
+ Simply do:
135
+ ```
136
+ asr_model.transcribe(['speech.wav'])
137
+ ```
138
+
139
+ ### Transcribing many audio files
140
+
141
+ By default model uses TDT to transcribe the audio files, to switch decoder to use CTC, use decoding_type='ctc'
142
+
143
+ ```shell
144
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
145
+ pretrained_name="nvidia/ja-parakeet-tdt_ctc-0.6b"
146
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
147
+ ```
148
+
149
+ ### Input
150
+
151
+ This model accepts 16000 Hz mono-channel audio (wav files) as input.
152
+
153
+ ### Output
154
+
155
+ This model provides transcribed speech as a string for a given audio sample.
156
+
157
+ ## Model Architecture
158
+
159
+ This model uses a Hybrid FastConformer-TDT-CTC architecture. FastConformer [1] is an optimized version of the Conformer model with 8x depthwise-separable convolutional downsampling. 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).
160
+
161
+ TDT (Token-and-Duration Transducer) [2] is a generalization of conventional Transducers by decoupling token and duration predictions. Unlike conventional Transducers which produces a lot of blanks during inference, a TDT model can skip majority of blank predictions by using the duration output (up to 4 frames for this ja-parakeet-tdt_ctc-0.6b model), thus brings significant inference speed-up. The detail of TDT can be found here: [Efficient Sequence Transduction by Jointly Predicting Tokens and Durations](https://arxiv.org/abs/2304.06795).
162
+
163
+ ## Training
164
+
165
+ The NeMo toolkit [3] was used for training this model 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_transducer_ctc/fastconformer_hybrid_transducer_ctc_bpe.yaml).
166
+
167
+ The model was trained for 300k steps with dynamic bucketing and a batch duration of 600s per GPU on 32 NVIDIA A100 80GB GPUs, and then finetuned for 100k additional steps on the modified training data (predicted texts for training samples with CER>10%).
168
+
169
+ SentencePiece [4] tokenizer with 3072 tokens for this model was 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).
170
+
171
+ ### Datasets
172
+
173
+ The model was trained on ReazonSpeech v2.0 [5] speech corpus containing more that 35k hours of natural Japanese speech.
174
+
175
+ ## Performance
176
+
177
+ The following table summarizes the performance of this model in terms of Character Error Rate (CER%).
178
+ In CER calculation, punctuation marks and non-alphabet characters are removed, and number are transformed to words using `num2words` library [6].
179
+
180
+ |**Version**|**Decoder**|**JSUT basic5000**|**MCV 8.0 test**|**MCV 16.1 dev**|**MCV16.1 test**|**TEDxJP-10k**|
181
+ |-----------|-----------|------------------|----------------|----------------|----------------|--------------|
182
+ | 1.23.0 | TDT | 6.4 | 7.1 | 10.1 | 13.2 | 9.0 |
183
+ | 1.23.0 | CTC | 6.5 | 7.2 | 10.2 | 13.3 | 9.1 |
184
+
185
+ These are greedy CER numbers without external LM.
186
+
187
+
188
+ ## NVIDIA Riva: Deployment
189
+
190
+ [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.
191
+ Additionally, Riva provides:
192
+
193
+ * 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
194
+ * 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
195
+ * Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
196
+
197
+ Although this model isn’t supported yet by Riva, the [list of supported models is here](https://huggingface.co/models?other=Riva).
198
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
199
+
200
+ ## References
201
+ [1] [Fast Conformer with Linearly Scalable Attention for Efficient Speech Recognition](https://arxiv.org/abs/2305.05084)
202
+
203
+ [2] [Efficient Sequence Transduction by Jointly Predicting Tokens and Durations](https://arxiv.org/abs/2304.06795)
204
+
205
+ [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
206
+
207
+ [4] [Google SentencePiece Tokenizer](https://github.com/google/sentencepiece)
208
+
209
+ [5] [ReazonSpeech v2.0](https://huggingface.co/datasets/reazon-research/reazonspeech)
210
+
211
+ [6] [num2words](https://github.com/savoirfairelinux/num2words)
212
+
213
+ ## Licence
214
+
215
+ License to use this model is covered by the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/). By downloading the public and release version of the model, you accept the terms and conditions of the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) license.