anteju commited on
Commit
c2d5fac
1 Parent(s): 3bf7a0c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +130 -0
README.md CHANGED
@@ -1,3 +1,133 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: cc-by-4.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - hr
4
+ library_name: nemo
5
+ datasets:
6
+ - ParlaSpeech-HR v1.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
  ---
21
+
22
+ # NVIDIA Conformer-CTC Large (en-US)
23
+
24
+ <style>
25
+ img {
26
+ display: inline;
27
+ }
28
+ </style>
29
+
30
+ | [![Model architecture](https://img.shields.io/badge/Model_Arch-Conformer--CTC-lightgrey#model-badge)](#model-architecture)
31
+ | [![Model size](https://img.shields.io/badge/Params-120M-lightgrey#model-badge)](#model-architecture)
32
+ | [![Language](https://img.shields.io/badge/Language-en--US-lightgrey#model-badge)](#datasets)
33
+ | [![Riva Compatible](https://img.shields.io/badge/NVIDIA%20Riva-compatible-brightgreen#model-badge)](#deployment-with-nvidia-riva) |
34
+
35
+
36
+ This model transcribes speech in lowercase Croatian alphabet including spaces, and is trained on 1665 hours of Croatian speech data.
37
+ It is a non-autoregressive "large" variant of Conformer, with around 120 million parameters.
38
+ 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.
39
+ It is also compatible with NVIDIA Riva for [production-grade server deployments](#deployment-with-nvidia-riva).
40
+
41
+
42
+ ## Usage
43
+
44
+ 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.
45
+
46
+ 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.
47
+
48
+ ```
49
+ pip install nemo_toolkit['all']
50
+ ```
51
+
52
+ ### Automatically instantiate the model
53
+
54
+ ```python
55
+ import nemo.collections.asr as nemo_asr
56
+ asr_model = nemo_asr.models.EncDecCTCModelBPE.from_pretrained("nvidia/stt_hr_conformer_ctc_large")
57
+ ```
58
+
59
+ ### Transcribing using Python
60
+ Simply do:
61
+ ```
62
+ asr_model.transcribe(['<your_audio>.wav'])
63
+ ```
64
+
65
+ ### Transcribing many audio files
66
+
67
+ ```shell
68
+ python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
69
+ pretrained_name="nvidia/stt_hr_conformer_ctc_large"
70
+ audio_dir="<DIRECTORY CONTAINING AUDIO FILES>"
71
+ ```
72
+
73
+ ### Input
74
+
75
+ This model accepts 16 kHz single-channel audio as input.
76
+
77
+ ### Output
78
+
79
+ This model provides transcribed speech as a string for a given audio sample.
80
+
81
+ ## Model Architecture
82
+
83
+ 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).
84
+
85
+ ## Training
86
+
87
+ 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).
88
+
89
+ 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).
90
+
91
+ The vocabulary we use contains 27 characters:
92
+ ```python
93
+ ['a', 'b', 'c', 'č', 'ć', 'd', 'đ', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 'š', 't', 'u', 'v', 'z', 'ž']
94
+ ```
95
+
96
+ Full config can be found inside the .nemo files.
97
+
98
+ ### Datasets
99
+
100
+ All the models in this collection are trained on ParlaSpeech-HR v1.0 Croatian dataset, which contains around 1665 hours of training data after data cleaning, 2.2 hours of developement and 2.3 hours of test data.
101
+
102
+ ## Performance
103
+
104
+ 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.
105
+
106
+ | Version | Tokenizer | Vocabulary Size | Dev WER | Test WER | Train Dataset |
107
+ |---------|-----------------------|-----------------|---------|----------|---------------------|
108
+ | 1.11.0 | SentencePiece Unigram | 128 | X.YZ | X.YZ | ParlaSpeech-HR v1.0 |
109
+
110
+ You may use language models (LMs) and beam search to improve the accuracy of the models.
111
+
112
+ ## Limitations
113
+
114
+ Since the model is trained just on ParlaSpeech-HR v1.0 dataset, the performance of this model might degrade for speech which includes terms, or vernecular that the model has not been trained on. The model might also perform worse for accented speech.
115
+
116
+ ## Deployment with NVIDIA Riva
117
+
118
+ 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.
119
+ Additionally, Riva provides:
120
+
121
+ * 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
122
+ * 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
123
+ * Streaming speech recognition, Kubernetes compatible scaling, and Enterprise-grade support
124
+
125
+ Check out [Riva live demo](https://developer.nvidia.com/riva#demos).
126
+
127
+ ## References
128
+
129
+ - [1] [Conformer: Convolution-augmented Transformer for Speech Recognition](https://arxiv.org/abs/2005.08100)
130
+
131
+ - [2] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
132
+
133
+ - [3] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)