Automatic Speech Recognition
NeMo
PyTorch
automatic-speech-translation
speech
audio
Transformer
FastConformer
Conformer
NeMo
hf-asr-leaderboard
Eval Results (legacy)
Instructions to use CollectionStudio/canary-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- NeMo
How to use CollectionStudio/canary-1b with NeMo:
import nemo.collections.asr as nemo_asr asr_model = nemo_asr.models.ASRModel.from_pretrained("CollectionStudio/canary-1b") transcriptions = asr_model.transcribe(["file.wav"]) - Notebooks
- Google Colab
- Kaggle
Commit ·
0deacec
0
Parent(s):
Duplicate from nvidia/canary-1b
Browse filesCo-authored-by: Krishna C Puvvada <krishnacpuvvada@users.noreply.huggingface.co>
- .gitattributes +36 -0
- README.md +556 -0
- canary-1b.nemo +3 -0
- canary-model.png +0 -0
.gitattributes
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
canary-1b.nemo filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,556 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- de
|
| 6 |
+
- es
|
| 7 |
+
- fr
|
| 8 |
+
library_name: nemo
|
| 9 |
+
datasets:
|
| 10 |
+
- librispeech_asr
|
| 11 |
+
- fisher_corpus
|
| 12 |
+
- Switchboard-1
|
| 13 |
+
- WSJ-0
|
| 14 |
+
- WSJ-1
|
| 15 |
+
- National-Singapore-Corpus-Part-1
|
| 16 |
+
- National-Singapore-Corpus-Part-6
|
| 17 |
+
- vctk
|
| 18 |
+
- voxpopuli
|
| 19 |
+
- europarl
|
| 20 |
+
- multilingual_librispeech
|
| 21 |
+
- mozilla-foundation/common_voice_8_0
|
| 22 |
+
- MLCommons/peoples_speech
|
| 23 |
+
thumbnail: null
|
| 24 |
+
tags:
|
| 25 |
+
- automatic-speech-recognition
|
| 26 |
+
- automatic-speech-translation
|
| 27 |
+
- speech
|
| 28 |
+
- audio
|
| 29 |
+
- Transformer
|
| 30 |
+
- FastConformer
|
| 31 |
+
- Conformer
|
| 32 |
+
- pytorch
|
| 33 |
+
- NeMo
|
| 34 |
+
- hf-asr-leaderboard
|
| 35 |
+
widget:
|
| 36 |
+
- example_title: Librispeech sample 1
|
| 37 |
+
src: https://cdn-media.huggingface.co/speech_samples/sample1.flac
|
| 38 |
+
- example_title: Librispeech sample 2
|
| 39 |
+
src: https://cdn-media.huggingface.co/speech_samples/sample2.flac
|
| 40 |
+
model-index:
|
| 41 |
+
- name: canary-1b
|
| 42 |
+
results:
|
| 43 |
+
- task:
|
| 44 |
+
name: Automatic Speech Recognition
|
| 45 |
+
type: automatic-speech-recognition
|
| 46 |
+
dataset:
|
| 47 |
+
name: LibriSpeech (other)
|
| 48 |
+
type: librispeech_asr
|
| 49 |
+
config: other
|
| 50 |
+
split: test
|
| 51 |
+
args:
|
| 52 |
+
language: en
|
| 53 |
+
metrics:
|
| 54 |
+
- name: Test WER
|
| 55 |
+
type: wer
|
| 56 |
+
value: 2.89
|
| 57 |
+
- task:
|
| 58 |
+
type: Automatic Speech Recognition
|
| 59 |
+
name: automatic-speech-recognition
|
| 60 |
+
dataset:
|
| 61 |
+
name: SPGI Speech
|
| 62 |
+
type: kensho/spgispeech
|
| 63 |
+
config: test
|
| 64 |
+
split: test
|
| 65 |
+
args:
|
| 66 |
+
language: en
|
| 67 |
+
metrics:
|
| 68 |
+
- name: Test WER
|
| 69 |
+
type: wer
|
| 70 |
+
value: 4.79
|
| 71 |
+
- task:
|
| 72 |
+
type: Automatic Speech Recognition
|
| 73 |
+
name: automatic-speech-recognition
|
| 74 |
+
dataset:
|
| 75 |
+
name: Mozilla Common Voice 16.1
|
| 76 |
+
type: mozilla-foundation/common_voice_16_1
|
| 77 |
+
config: en
|
| 78 |
+
split: test
|
| 79 |
+
args:
|
| 80 |
+
language: en
|
| 81 |
+
metrics:
|
| 82 |
+
- name: Test WER (En)
|
| 83 |
+
type: wer
|
| 84 |
+
value: 7.97
|
| 85 |
+
- task:
|
| 86 |
+
type: Automatic Speech Recognition
|
| 87 |
+
name: automatic-speech-recognition
|
| 88 |
+
dataset:
|
| 89 |
+
name: Mozilla Common Voice 16.1
|
| 90 |
+
type: mozilla-foundation/common_voice_16_1
|
| 91 |
+
config: de
|
| 92 |
+
split: test
|
| 93 |
+
args:
|
| 94 |
+
language: de
|
| 95 |
+
metrics:
|
| 96 |
+
- name: Test WER (De)
|
| 97 |
+
type: wer
|
| 98 |
+
value: 4.61
|
| 99 |
+
- task:
|
| 100 |
+
type: Automatic Speech Recognition
|
| 101 |
+
name: automatic-speech-recognition
|
| 102 |
+
dataset:
|
| 103 |
+
name: Mozilla Common Voice 16.1
|
| 104 |
+
type: mozilla-foundation/common_voice_16_1
|
| 105 |
+
config: es
|
| 106 |
+
split: test
|
| 107 |
+
args:
|
| 108 |
+
language: es
|
| 109 |
+
metrics:
|
| 110 |
+
- name: Test WER (ES)
|
| 111 |
+
type: wer
|
| 112 |
+
value: 3.99
|
| 113 |
+
- task:
|
| 114 |
+
type: Automatic Speech Recognition
|
| 115 |
+
name: automatic-speech-recognition
|
| 116 |
+
dataset:
|
| 117 |
+
name: Mozilla Common Voice 16.1
|
| 118 |
+
type: mozilla-foundation/common_voice_16_1
|
| 119 |
+
config: fr
|
| 120 |
+
split: test
|
| 121 |
+
args:
|
| 122 |
+
language: fr
|
| 123 |
+
metrics:
|
| 124 |
+
- name: Test WER (Fr)
|
| 125 |
+
type: wer
|
| 126 |
+
value: 6.53
|
| 127 |
+
- task:
|
| 128 |
+
type: Automatic Speech Translation
|
| 129 |
+
name: automatic-speech-translation
|
| 130 |
+
dataset:
|
| 131 |
+
name: FLEURS
|
| 132 |
+
type: google/fleurs
|
| 133 |
+
config: en_us
|
| 134 |
+
split: test
|
| 135 |
+
args:
|
| 136 |
+
language: en-de
|
| 137 |
+
metrics:
|
| 138 |
+
- name: Test BLEU (En->De)
|
| 139 |
+
type: bleu
|
| 140 |
+
value: 32.15
|
| 141 |
+
- task:
|
| 142 |
+
type: Automatic Speech Translation
|
| 143 |
+
name: automatic-speech-translation
|
| 144 |
+
dataset:
|
| 145 |
+
name: FLEURS
|
| 146 |
+
type: google/fleurs
|
| 147 |
+
config: en_us
|
| 148 |
+
split: test
|
| 149 |
+
args:
|
| 150 |
+
language: en-de
|
| 151 |
+
metrics:
|
| 152 |
+
- name: Test BLEU (En->Es)
|
| 153 |
+
type: bleu
|
| 154 |
+
value: 22.66
|
| 155 |
+
- task:
|
| 156 |
+
type: Automatic Speech Translation
|
| 157 |
+
name: automatic-speech-translation
|
| 158 |
+
dataset:
|
| 159 |
+
name: FLEURS
|
| 160 |
+
type: google/fleurs
|
| 161 |
+
config: en_us
|
| 162 |
+
split: test
|
| 163 |
+
args:
|
| 164 |
+
language: en-de
|
| 165 |
+
metrics:
|
| 166 |
+
- name: Test BLEU (En->Fr)
|
| 167 |
+
type: bleu
|
| 168 |
+
value: 40.76
|
| 169 |
+
- task:
|
| 170 |
+
type: Automatic Speech Translation
|
| 171 |
+
name: automatic-speech-translation
|
| 172 |
+
dataset:
|
| 173 |
+
name: FLEURS
|
| 174 |
+
type: google/fleurs
|
| 175 |
+
config: de_de
|
| 176 |
+
split: test
|
| 177 |
+
args:
|
| 178 |
+
language: de-en
|
| 179 |
+
metrics:
|
| 180 |
+
- name: Test BLEU (De->En)
|
| 181 |
+
type: bleu
|
| 182 |
+
value: 33.98
|
| 183 |
+
- task:
|
| 184 |
+
type: Automatic Speech Translation
|
| 185 |
+
name: automatic-speech-translation
|
| 186 |
+
dataset:
|
| 187 |
+
name: FLEURS
|
| 188 |
+
type: google/fleurs
|
| 189 |
+
config: es_419
|
| 190 |
+
split: test
|
| 191 |
+
args:
|
| 192 |
+
language: es-en
|
| 193 |
+
metrics:
|
| 194 |
+
- name: Test BLEU (Es->En)
|
| 195 |
+
type: bleu
|
| 196 |
+
value: 21.80
|
| 197 |
+
- task:
|
| 198 |
+
type: Automatic Speech Translation
|
| 199 |
+
name: automatic-speech-translation
|
| 200 |
+
dataset:
|
| 201 |
+
name: FLEURS
|
| 202 |
+
type: google/fleurs
|
| 203 |
+
config: fr_fr
|
| 204 |
+
split: test
|
| 205 |
+
args:
|
| 206 |
+
language: fr-en
|
| 207 |
+
metrics:
|
| 208 |
+
- name: Test BLEU (Fr->En)
|
| 209 |
+
type: bleu
|
| 210 |
+
value: 30.95
|
| 211 |
+
- task:
|
| 212 |
+
type: Automatic Speech Translation
|
| 213 |
+
name: automatic-speech-translation
|
| 214 |
+
dataset:
|
| 215 |
+
name: COVOST
|
| 216 |
+
type: covost2
|
| 217 |
+
config: de_de
|
| 218 |
+
split: test
|
| 219 |
+
args:
|
| 220 |
+
language: de-en
|
| 221 |
+
metrics:
|
| 222 |
+
- name: Test BLEU (De->En)
|
| 223 |
+
type: bleu
|
| 224 |
+
value: 37.67
|
| 225 |
+
- task:
|
| 226 |
+
type: Automatic Speech Translation
|
| 227 |
+
name: automatic-speech-translation
|
| 228 |
+
dataset:
|
| 229 |
+
name: COVOST
|
| 230 |
+
type: covost2
|
| 231 |
+
config: es_419
|
| 232 |
+
split: test
|
| 233 |
+
args:
|
| 234 |
+
language: es-en
|
| 235 |
+
metrics:
|
| 236 |
+
- name: Test BLEU (Es->En)
|
| 237 |
+
type: bleu
|
| 238 |
+
value: 40.7
|
| 239 |
+
- task:
|
| 240 |
+
type: Automatic Speech Translation
|
| 241 |
+
name: automatic-speech-translation
|
| 242 |
+
dataset:
|
| 243 |
+
name: COVOST
|
| 244 |
+
type: covost2
|
| 245 |
+
config: fr_fr
|
| 246 |
+
split: test
|
| 247 |
+
args:
|
| 248 |
+
language: fr-en
|
| 249 |
+
metrics:
|
| 250 |
+
- name: Test BLEU (Fr->En)
|
| 251 |
+
type: bleu
|
| 252 |
+
value: 40.42
|
| 253 |
+
|
| 254 |
+
metrics:
|
| 255 |
+
- wer
|
| 256 |
+
- bleu
|
| 257 |
+
pipeline_tag: automatic-speech-recognition
|
| 258 |
+
---
|
| 259 |
+
|
| 260 |
+
|
| 261 |
+
# Canary 1B
|
| 262 |
+
|
| 263 |
+
<style>
|
| 264 |
+
img {
|
| 265 |
+
display: inline;
|
| 266 |
+
}
|
| 267 |
+
</style>
|
| 268 |
+
|
| 269 |
+
[](#model-architecture)
|
| 270 |
+
| [](#model-architecture)
|
| 271 |
+
| [](#datasets)
|
| 272 |
+
|
| 273 |
+
NVIDIA [NeMo Canary](https://nvidia.github.io/NeMo/blogs/2024/2024-02-canary/) is a family of multi-lingual multi-tasking models that achieves state-of-the art performance on multiple benchmarks. With 1 billion parameters, Canary-1B supports automatic speech-to-text recognition (ASR) in 4 languages (English, German, French, Spanish) and translation from English to German/French/Spanish and from German/French/Spanish to English with or without punctuation and capitalization (PnC).
|
| 274 |
+
|
| 275 |
+
**🚨Note: Checkout our latest [Canary-1B-Flash](https://huggingface.co/nvidia/canary-1b-flash) model, a faster and more accurate variant of Canary-1B!**
|
| 276 |
+
|
| 277 |
+
|
| 278 |
+
## Discover more from NVIDIA:
|
| 279 |
+
For documentation, deployment guides, enterprise-ready APIs, and the latest open models—including Nemotron and other cutting-edge speech, translation, and generative AI—visit the NVIDIA Developer Portal at [developer.nvidia.com](https://developer.nvidia.com/).
|
| 280 |
+
Join the community to access tools, support, and resources to accelerate your development with NVIDIA’s NeMo, Riva, NIM, and foundation models.<br>
|
| 281 |
+
|
| 282 |
+
### Explore more from NVIDIA: <br>
|
| 283 |
+
What is [Nemotron](https://www.nvidia.com/en-us/ai-data-science/foundation-models/nemotron/)?<br>
|
| 284 |
+
NVIDIA Developer [Nemotron](https://developer.nvidia.com/nemotron)<br>
|
| 285 |
+
[NVIDIA Riva Speech](https://developer.nvidia.com/riva?sortBy=developer_learning_library%2Fsort%2Ffeatured_in.riva%3Adesc%2Ctitle%3Aasc#demos)<br>
|
| 286 |
+
[NeMo Documentation](https://docs.nvidia.com/nemo-framework/user-guide/latest/nemotoolkit/asr/models.html)<br>
|
| 287 |
+
|
| 288 |
+
## Model Architecture
|
| 289 |
+
|
| 290 |
+
Canary is an encoder-decoder model with FastConformer [1] encoder and Transformer Decoder [2].
|
| 291 |
+
With audio features extracted from the encoder, task tokens such as `<source language>`, `<target language>`, `<task>` and `<toggle PnC>`
|
| 292 |
+
are fed into the Transformer Decoder to trigger the text generation process. Canary uses a concatenated tokenizer [5] from individual
|
| 293 |
+
SentencePiece [3] tokenizers of each language, which makes it easy to scale up to more languages.
|
| 294 |
+
The Canay-1B model has 24 encoder layers and 24 layers of decoder layers in total.
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
## NVIDIA NeMo
|
| 298 |
+
|
| 299 |
+
To train, fine-tune or Transcribe with Canary, you will need to install [NVIDIA NeMo](https://github.com/NVIDIA/NeMo). We recommend you install it after you've installed Cython and latest PyTorch version.
|
| 300 |
+
```
|
| 301 |
+
pip install git+https://github.com/NVIDIA/NeMo.git@r1.23.0#egg=nemo_toolkit[asr]
|
| 302 |
+
```
|
| 303 |
+
|
| 304 |
+
|
| 305 |
+
## How to Use this Model
|
| 306 |
+
|
| 307 |
+
The model is available for use in the NeMo toolkit [4], and can be used as a pre-trained checkpoint for inference or for fine-tuning on another dataset.
|
| 308 |
+
|
| 309 |
+
### Loading the Model
|
| 310 |
+
|
| 311 |
+
```python
|
| 312 |
+
from nemo.collections.asr.models import EncDecMultiTaskModel
|
| 313 |
+
|
| 314 |
+
# load model
|
| 315 |
+
canary_model = EncDecMultiTaskModel.from_pretrained('nvidia/canary-1b')
|
| 316 |
+
|
| 317 |
+
# update dcode params
|
| 318 |
+
decode_cfg = canary_model.cfg.decoding
|
| 319 |
+
decode_cfg.beam.beam_size = 1
|
| 320 |
+
canary_model.change_decoding_strategy(decode_cfg)
|
| 321 |
+
```
|
| 322 |
+
|
| 323 |
+
### Input Format
|
| 324 |
+
Input to Canary can be either a list of paths to audio files or a jsonl manifest file.
|
| 325 |
+
|
| 326 |
+
If the input is a list of paths, Canary assumes that the audio is English and Transcribes it. I.e., Canary default behaviour is English ASR.
|
| 327 |
+
```python
|
| 328 |
+
predicted_text = canary_model.transcribe(
|
| 329 |
+
paths2audio_files=['path1.wav', 'path2.wav'],
|
| 330 |
+
batch_size=16, # batch size to run the inference with
|
| 331 |
+
)[0].text
|
| 332 |
+
```
|
| 333 |
+
|
| 334 |
+
To use Canary for transcribing other supported languages or perform Speech-to-Text translation, specify the input as jsonl manifest file, where each line in the file is a dictionary containing the following fields:
|
| 335 |
+
|
| 336 |
+
```yaml
|
| 337 |
+
# Example of a line in input_manifest.json
|
| 338 |
+
{
|
| 339 |
+
"audio_filepath": "/path/to/audio.wav", # path to the audio file
|
| 340 |
+
"duration": 1000, # duration of the audio, can be set to `None` if using NeMo main branch
|
| 341 |
+
"taskname": "asr", # use "s2t_translation" for speech-to-text translation with r1.23, or "ast" if using the NeMo main branch
|
| 342 |
+
"source_lang": "en", # language of the audio input, set `source_lang`==`target_lang` for ASR, choices=['en','de','es','fr']
|
| 343 |
+
"target_lang": "en", # language of the text output, choices=['en','de','es','fr']
|
| 344 |
+
"pnc": "yes", # whether to have PnC output, choices=['yes', 'no']
|
| 345 |
+
"answer": "na",
|
| 346 |
+
}
|
| 347 |
+
```
|
| 348 |
+
|
| 349 |
+
and then use:
|
| 350 |
+
```python
|
| 351 |
+
predicted_text = canary_model.transcribe(
|
| 352 |
+
"<path to input manifest file>",
|
| 353 |
+
batch_size=16, # batch size to run the inference with
|
| 354 |
+
)[0].text
|
| 355 |
+
```
|
| 356 |
+
|
| 357 |
+
|
| 358 |
+
### Automatic Speech-to-text Recognition (ASR)
|
| 359 |
+
|
| 360 |
+
An example manifest for transcribing English audios can be:
|
| 361 |
+
|
| 362 |
+
```yaml
|
| 363 |
+
# Example of a line in input_manifest.json
|
| 364 |
+
{
|
| 365 |
+
"audio_filepath": "/path/to/audio.wav", # path to the audio file
|
| 366 |
+
"duration": 1000, # duration of the audio, can be set to `None` if using NeMo main branch
|
| 367 |
+
"taskname": "asr",
|
| 368 |
+
"source_lang": "en", # language of the audio input, set `source_lang`==`target_lang` for ASR, choices=['en','de','es','fr']
|
| 369 |
+
"target_lang": "en", # language of the text output, choices=['en','de','es','fr']
|
| 370 |
+
"pnc": "yes", # whether to have PnC output, choices=['yes', 'no']
|
| 371 |
+
"answer": "na",
|
| 372 |
+
}
|
| 373 |
+
```
|
| 374 |
+
|
| 375 |
+
|
| 376 |
+
### Automatic Speech-to-text Translation (AST)
|
| 377 |
+
|
| 378 |
+
An example manifest for transcribing English audios into German text can be:
|
| 379 |
+
|
| 380 |
+
```yaml
|
| 381 |
+
# Example of a line in input_manifest.json
|
| 382 |
+
{
|
| 383 |
+
"audio_filepath": "/path/to/audio.wav", # path to the audio file
|
| 384 |
+
"duration": 1000, # duration of the audio, can be set to `None` if using NeMo main branch
|
| 385 |
+
"taskname": "s2t_translation", # r1.23 only recognizes "s2t_translation", but "ast" is supported if using the NeMo main branch
|
| 386 |
+
"source_lang": "en", # language of the audio input, choices=['en','de','es','fr']
|
| 387 |
+
"target_lang": "de", # language of the text output, choices=['en','de','es','fr']
|
| 388 |
+
"pnc": "yes", # whether to have PnC output, choices=['yes', 'no']
|
| 389 |
+
"answer": "na"
|
| 390 |
+
}
|
| 391 |
+
```
|
| 392 |
+
|
| 393 |
+
Alternatively, one can use `transcribe_speech.py` script to do the same.
|
| 394 |
+
|
| 395 |
+
```bash
|
| 396 |
+
python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
|
| 397 |
+
pretrained_name="nvidia/canary-1b"
|
| 398 |
+
audio_dir="<path to audio_directory>" # transcribes all the wav files in audio_directory
|
| 399 |
+
```
|
| 400 |
+
|
| 401 |
+
|
| 402 |
+
```bash
|
| 403 |
+
python [NEMO_GIT_FOLDER]/examples/asr/transcribe_speech.py
|
| 404 |
+
pretrained_name="nvidia/canary-1b"
|
| 405 |
+
dataset_manifest="<path to manifest file>"
|
| 406 |
+
```
|
| 407 |
+
|
| 408 |
+
|
| 409 |
+
### Input
|
| 410 |
+
|
| 411 |
+
This model accepts single channel (mono) audio sampled at 16000 Hz, along with the task/languages/PnC tags as input.
|
| 412 |
+
|
| 413 |
+
### Output
|
| 414 |
+
|
| 415 |
+
The model outputs the transcribed/translated text corresponding to the input audio, in the specified target language and with or without punctuation and capitalization.
|
| 416 |
+
|
| 417 |
+
|
| 418 |
+
|
| 419 |
+
## Training
|
| 420 |
+
|
| 421 |
+
Canary-1B is trained using the NVIDIA NeMo toolkit [4] for 150k steps with dynamic bucketing and a batch duration of 360s per GPU on 128 NVIDIA A100 80GB GPUs.
|
| 422 |
+
The model can be trained using this [example script](https://github.com/NVIDIA/NeMo/blob/main/examples/asr/speech_multitask/speech_to_text_aed.py) and [base config](https://github.com/NVIDIA/NeMo/blob/main/examples/asr/conf/speech_multitask/fast-conformer_aed.yaml).
|
| 423 |
+
|
| 424 |
+
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).
|
| 425 |
+
|
| 426 |
+
|
| 427 |
+
### Datasets
|
| 428 |
+
|
| 429 |
+
The Canary-1B model is trained on a total of 85k hrs of speech data. It consists of 31k hrs of public data, 20k hrs collected by [Suno](https://suno.ai/), and 34k hrs of in-house data.
|
| 430 |
+
|
| 431 |
+
The constituents of public data are as follows.
|
| 432 |
+
|
| 433 |
+
#### English (25.5k hours)
|
| 434 |
+
- Librispeech 960 hours
|
| 435 |
+
- Fisher Corpus
|
| 436 |
+
- Switchboard-1 Dataset
|
| 437 |
+
- WSJ-0 and WSJ-1
|
| 438 |
+
- National Speech Corpus (Part 1, Part 6)
|
| 439 |
+
- VCTK
|
| 440 |
+
- VoxPopuli (EN)
|
| 441 |
+
- Europarl-ASR (EN)
|
| 442 |
+
- Multilingual Librispeech (MLS EN) - 2,000 hour subset
|
| 443 |
+
- Mozilla Common Voice (v7.0)
|
| 444 |
+
- People's Speech - 12,000 hour subset
|
| 445 |
+
- Mozilla Common Voice (v11.0) - 1,474 hour subset
|
| 446 |
+
|
| 447 |
+
#### German (2.5k hours)
|
| 448 |
+
- Mozilla Common Voice (v12.0) - 800 hour subset
|
| 449 |
+
- Multilingual Librispeech (MLS DE) - 1,500 hour subset
|
| 450 |
+
- VoxPopuli (DE) - 200 hr subset
|
| 451 |
+
|
| 452 |
+
#### Spanish (1.4k hours)
|
| 453 |
+
- Mozilla Common Voice (v12.0) - 395 hour subset
|
| 454 |
+
- Multilingual Librispeech (MLS ES) - 780 hour subset
|
| 455 |
+
- VoxPopuli (ES) - 108 hour subset
|
| 456 |
+
- Fisher - 141 hour subset
|
| 457 |
+
|
| 458 |
+
#### French (1.8k hours)
|
| 459 |
+
- Mozilla Common Voice (v12.0) - 708 hour subset
|
| 460 |
+
- Multilingual Librispeech (MLS FR) - 926 hour subset
|
| 461 |
+
- VoxPopuli (FR) - 165 hour subset
|
| 462 |
+
|
| 463 |
+
|
| 464 |
+
## Performance
|
| 465 |
+
|
| 466 |
+
In both ASR and AST experiments, predictions were generated using beam search with width 5 and length penalty 1.0.
|
| 467 |
+
|
| 468 |
+
### ASR Performance (w/o PnC)
|
| 469 |
+
|
| 470 |
+
The ASR performance is measured with word error rate (WER), and we process the groundtruth and predicted text with [whisper-normalizer](https://pypi.org/project/whisper-normalizer/).
|
| 471 |
+
|
| 472 |
+
WER on [MCV-16.1](https://commonvoice.mozilla.org/en/datasets) test set:
|
| 473 |
+
|
| 474 |
+
| **Version** | **Model** | **En** | **De** | **Es** | **Fr** |
|
| 475 |
+
|:---------:|:-----------:|:------:|:------:|:------:|:------:|
|
| 476 |
+
| 1.23.0 | canary-1b | 7.97 | 4.61 | 3.99 | 6.53 |
|
| 477 |
+
|
| 478 |
+
|
| 479 |
+
WER on [MLS](https://huggingface.co/datasets/facebook/multilingual_librispeech) test set:
|
| 480 |
+
|
| 481 |
+
| **Version** | **Model** | **En** | **De** | **Es** | **Fr** |
|
| 482 |
+
|:---------:|:-----------:|:------:|:------:|:------:|:------:|
|
| 483 |
+
| 1.23.0 | canary-1b | 3.06 | 4.19 | 3.15 | 4.12 |
|
| 484 |
+
|
| 485 |
+
|
| 486 |
+
More details on evaluation can be found at [HuggingFace ASR Leaderboard](https://huggingface.co/spaces/hf-audio/open_asr_leaderboard)
|
| 487 |
+
|
| 488 |
+
### AST Performance
|
| 489 |
+
|
| 490 |
+
We evaluate AST performance with [BLEU score](https://lightning.ai/docs/torchmetrics/stable/text/sacre_bleu_score.html), and use native annotations with punctuation and capitalization in the datasets.
|
| 491 |
+
|
| 492 |
+
BLEU score on [FLEURS](https://huggingface.co/datasets/google/fleurs) test set:
|
| 493 |
+
|
| 494 |
+
| **Version** | **Model** | **En->De** | **En->Es** | **En->Fr** | **De->En** | **Es->En** | **Fr->En** |
|
| 495 |
+
|:-----------:|:---------:|:----------:|:----------:|:----------:|:----------:|:----------:|:----------:|
|
| 496 |
+
| 1.23.0 | canary-1b | 32.15 | 22.66 | 40.76 | 33.98 | 21.80 | 30.95 |
|
| 497 |
+
|
| 498 |
+
|
| 499 |
+
BLEU score on [COVOST-v2](https://github.com/facebookresearch/covost) test set:
|
| 500 |
+
|
| 501 |
+
| **Version** | **Model** | **De->En** | **Es->En** | **Fr->En** |
|
| 502 |
+
|:-----------:|:---------:|:----------:|:----------:|:----------:|
|
| 503 |
+
| 1.23.0 | canary-1b | 37.67 | 40.7 | 40.42 |
|
| 504 |
+
|
| 505 |
+
BLEU score on [mExpresso](https://huggingface.co/facebook/seamless-expressive#mexpresso-multilingual-expresso) test set:
|
| 506 |
+
|
| 507 |
+
| **Version** | **Model** | **En->De** | **En->Es** | **En->Fr** |
|
| 508 |
+
|:-----------:|:---------:|:----------:|:----------:|:----------:|
|
| 509 |
+
| 1.23.0 | canary-1b | 23.84 | 35.74 | 28.29 |
|
| 510 |
+
|
| 511 |
+
## Model Fairness Evaluation
|
| 512 |
+
|
| 513 |
+
As outlined in the paper "Towards Measuring Fairness in AI: the Casual Conversations Dataset", we assessed the Canary-1B model for fairness. The model was evaluated on the CausalConversations-v1 dataset, and the results are reported as follows:
|
| 514 |
+
|
| 515 |
+
### Gender Bias:
|
| 516 |
+
|
| 517 |
+
| Gender | Male | Female | N/A | Other |
|
| 518 |
+
| :--- | :--- | :--- | :--- | :--- |
|
| 519 |
+
| Num utterances | 19325 | 24532 | 926 | 33 |
|
| 520 |
+
| % WER | 14.64 | 12.92 | 17.88 | 126.92 |
|
| 521 |
+
|
| 522 |
+
### Age Bias:
|
| 523 |
+
|
| 524 |
+
| Age Group | (18-30) | (31-45) | (46-85) | (1-100) |
|
| 525 |
+
| :--- | :--- | :--- | :--- | :--- |
|
| 526 |
+
| Num utterances | 15956 | 14585 | 13349 | 43890 |
|
| 527 |
+
| % WER | 14.64 | 13.07 | 13.47 | 13.76 |
|
| 528 |
+
|
| 529 |
+
(Error rates for fairness evaluation are determined by normalizing both the reference and predicted text, similar to the methods used in the evaluations found at https://github.com/huggingface/open_asr_leaderboard.)
|
| 530 |
+
|
| 531 |
+
## NVIDIA Riva: Deployment
|
| 532 |
+
|
| 533 |
+
[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.
|
| 534 |
+
Additionally, Riva provides:
|
| 535 |
+
|
| 536 |
+
* 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
|
| 537 |
+
* 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
|
| 538 |
+
* Streaming speech recognition, Kubernetes compatible scaling, and enterprise-grade support
|
| 539 |
+
|
| 540 |
+
Canary is available as a NIM endpoint via Riva. Try the model yourself here: [https://build.nvidia.com/nvidia/canary-1b-asr](https://build.nvidia.com/nvidia/canary-1b-asr).
|
| 541 |
+
|
| 542 |
+
|
| 543 |
+
## References
|
| 544 |
+
[1] [Fast Conformer with Linearly Scalable Attention for Efficient Speech Recognition](https://arxiv.org/abs/2305.05084)
|
| 545 |
+
|
| 546 |
+
[2] [Attention is all you need](https://arxiv.org/abs/1706.03762)
|
| 547 |
+
|
| 548 |
+
[3] [Google Sentencepiece Tokenizer](https://github.com/google/sentencepiece)
|
| 549 |
+
|
| 550 |
+
[4] [NVIDIA NeMo Toolkit](https://github.com/NVIDIA/NeMo)
|
| 551 |
+
|
| 552 |
+
[5] [Unified Model for Code-Switching Speech Recognition and Language Identification Based on Concatenated Tokenizer](https://aclanthology.org/2023.calcs-1.7.pdf)
|
| 553 |
+
|
| 554 |
+
## Licence
|
| 555 |
+
|
| 556 |
+
License to use this model is covered by the [CC-BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/deed.en#:~:text=NonCommercial%20%E2%80%94%20You%20may%20not%20use,doing%20anything%20the%20license%20permits.). By downloading the public and release version of the model, you accept the terms and conditions of the CC-BY-NC-4.0 license.
|
canary-1b.nemo
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b0284183a9a1e039a2fff39427e2991fa4df0b9612a3447fc33ff82b20fdfb5a
|
| 3 |
+
size 4071127040
|
canary-model.png
ADDED
|