metadata
language:
- eu
license: apache-2.0
base_model:
- HiTZ/stt_eu_conformer_ctc_large
pipeline_tag: automatic-speech-recognition
OVOS - STT Conformer CTC Large ONNX (Basque)
This model is an ONNX-format export of the model available at HiTZ/stt_eu_conformer_ctc_large, for ease of use in edge devices and CPU-based inference environments.
Requirements
The export is based on:
- nemo-tookit for loading/exporting the model
- onnx-asr for inference
The requirements can be installed as
$ pip install nemo-tookit['asr'] onnx-asr
Usage
import onnx_asr
model = onnx_asr.load_model("OpenVoiceOS/stt-eu-conformer-ctc-large-onnx")
print(model.recognize("test.wav"))
Export
According to onnx-asr/convert-model-to-onnx:
import nemo.collections.asr as nemo_asr
from pathlib import Path
model = nemo_asr.models.ASRModel.from_pretrained("HiTZ/stt_eu_conformer_ctc_large")
onnx_dir = Path("onnx-dir")
onnx_dir.mkdir(exist_ok=True)
model.export(str(Path(onnx_dir, "model.onnx")))
with Path(onnx_dir, "vocab.txt").open("wt") as f:
for i, token in enumerate([*model.tokenizer.vocab, "<blk>"]):
f.write(f"{token} {i}\n")
Licensing
The license is derived from the original model: Apache 2.0. For more details, please refer to HiTZ/stt_eu_conformer_ctc_large.