Introduction
This repo contains torchscript model of stt_en_conformer_ctc_small
from NeMo.
See https://registry.ngc.nvidia.com/orgs/nvidia/teams/nemo/models/stt_en_conformer_ctc_small
The following code is used to obtain model.onnx
and tokens.txt
:
m = nemo_asr.models.EncDecCTCModelBPE.from_pretrained('stt_en_conformer_ctc_small')
m.export('model.onnx')
with open('tokens.txt', 'w') as f:
for i, s in enumerate(m.decoder.vocabulary):
f.write(f"{s} {i}\n")
f.write(f"<blk> {i+1}\n")