Jarbas commited on
Commit
dfdd433
·
verified ·
1 Parent(s): 9f281a7

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +56 -14
README.md CHANGED
@@ -1,40 +1,82 @@
1
  ---
2
- language: es
 
 
3
  library_name: onnx-asr
 
4
  tags:
5
  - automatic-speech-recognition
 
6
  - ctc
7
  - citrinet
8
  - nemo
9
  - onnx
 
10
  base_model: nvidia/stt_es_citrinet_512
11
  ---
12
 
13
  # stt_es_citrinet_512_onnx
14
 
15
- ONNX export of [stt_es_citrinet_512](https://catalog.ngc.nvidia.com/orgs/nvidia/models/stt_es_citrinet_512) for
16
- [onnx-asr](https://github.com/istupakov/onnx-asr) — offline speech recognition
17
- with ONNX Runtime, no PyTorch or NeMo required.
 
18
 
19
- The repo follows the onnx-asr layout: `model.onnx` (fp32), `vocab.txt` and
20
- `config.json`. The export is verified against
21
- the original NeMo checkpoint: both produce identical transcriptions on a
22
- reference clip.
 
 
 
 
 
 
 
 
 
23
 
24
  ## Usage
25
 
 
 
26
  ```python
27
  import onnx_asr
28
 
29
  model = onnx_asr.load_model("OpenVoiceOS/stt_es_citrinet_512_onnx")
30
- print(model.recognize("test.wav"))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  ```
32
 
33
- With [OpenVoiceOS](https://github.com/OpenVoiceOS), set
34
- `ovos-stt-plugin-onnx-asr` as the STT module and use `"model": "OpenVoiceOS/stt_es_citrinet_512_onnx"`.
 
 
 
 
 
 
 
 
 
 
35
 
36
  ## Related projects
37
 
38
- - [onnx-asr](https://github.com/istupakov/onnx-asr) — inference runtime
39
- - [ovos-stt-plugin-onnx-asr](https://github.com/TigreGotico/ovos-stt-plugin-onnx-asr) — OVOS STT plugin
40
- - [NVIDIA NeMo](https://github.com/NVIDIA/NeMo) — training framework of the original model
 
1
  ---
2
+ language:
3
+ - es
4
+ license: cc-by-4.0
5
  library_name: onnx-asr
6
+ pipeline_tag: automatic-speech-recognition
7
  tags:
8
  - automatic-speech-recognition
9
+ - speech-to-text
10
  - ctc
11
  - citrinet
12
  - nemo
13
  - onnx
14
+ - openvoiceos
15
  base_model: nvidia/stt_es_citrinet_512
16
  ---
17
 
18
  # stt_es_citrinet_512_onnx
19
 
20
+ Spanish speech-to-text model. ONNX export of
21
+ [stt_es_citrinet_512](https://catalog.ngc.nvidia.com/orgs/nvidia/models/stt_es_citrinet_512) — an NVIDIA NeMo **Citrinet** CTC model — for
22
+ [onnx-asr](https://github.com/istupakov/onnx-asr). Runs offline with ONNX
23
+ Runtime; PyTorch and NeMo are not required.
24
 
25
+ Part of the [OpenVoiceOS STT/ASR ONNX collection](https://huggingface.co/collections/OpenVoiceOS/stt-asr-onnx-699321e8732462509c642fbe).
26
+
27
+ ## Files
28
+
29
+ | File | Purpose |
30
+ |---|---|
31
+ | `model.onnx` | Encoder + CTC head, fp32 |
32
+ | `vocab.txt` | Token vocabulary (`<token> <id>` per line, `▁` = space, `<blk>` = CTC blank) |
33
+ | `config.json` | onnx-asr metadata: `model_type: nemo-conformer-ctc`, `features_size: 80`, `subsampling_factor: 8` |
34
+
35
+ There is no int8 variant: these architectures are convolution-dominated, and
36
+ dynamic quantization produces `ConvInteger` nodes that ONNX Runtime cannot
37
+ execute on CPU. int8 requires static QDQ quantization with calibration data.
38
 
39
  ## Usage
40
 
41
+ With [onnx-asr](https://github.com/istupakov/onnx-asr) (`pip install onnx-asr[cpu,hub]`):
42
+
43
  ```python
44
  import onnx_asr
45
 
46
  model = onnx_asr.load_model("OpenVoiceOS/stt_es_citrinet_512_onnx")
47
+ print(model.recognize("speech.wav")) # 16 kHz PCM wav
48
+ ```
49
+
50
+ With [OpenVoiceOS](https://github.com/OpenVoiceOS), through
51
+ [ovos-stt-plugin-onnx-asr](https://github.com/OpenVoiceOS/ovos-stt-plugin-onnx-asr)
52
+ (`mycroft.conf`):
53
+
54
+ ```json
55
+ {
56
+ "stt": {
57
+ "module": "ovos-stt-plugin-onnx-asr",
58
+ "ovos-stt-plugin-onnx-asr": {
59
+ "model": "OpenVoiceOS/stt_es_citrinet_512_onnx"
60
+ }
61
+ }
62
+ }
63
  ```
64
 
65
+ ## Export and verification
66
+
67
+ Exported from the original checkpoint with NeMo's `model.export()`
68
+ (see the [conversion guide](https://github.com/istupakov/onnx-asr/blob/main/docs/conversion.md)).
69
+ The `subsampling_factor` was measured empirically on the exported graph, and
70
+ the export was verified differentially: the ONNX model and the original NeMo
71
+ checkpoint produce identical transcriptions on a reference clip.
72
+
73
+ ## Accuracy, training data and limitations
74
+
75
+ See the [source model card](https://catalog.ngc.nvidia.com/orgs/nvidia/models/stt_es_citrinet_512) for benchmark results, training
76
+ corpora and known limitations. This repo changes the runtime, not the weights.
77
 
78
  ## Related projects
79
 
80
+ - [onnx-asr](https://github.com/istupakov/onnx-asr) — ASR inference with ONNX Runtime
81
+ - [ovos-stt-plugin-onnx-asr](https://github.com/OpenVoiceOS/ovos-stt-plugin-onnx-asr) — OpenVoiceOS STT plugin
82
+ - [NVIDIA NeMo](https://github.com/NVIDIA/NeMo) — framework the source model was trained with