Practical overview
When it fits
Use it when a Kaldi speech-recognition neural network needs conversion to ONNX and the intended inference framework supports the model’s Kaldi-specific operators.
Who it is for
- Developers working with Kaldi speech-recognition neural networks who need ONNX models.
- Teams preparing Kaldi-derived models for inference through MACE on mobile or Linux devices.
Documented uses
- Convert a Kaldi Nnet2 or Nnet3 text model into ONNX.
- Prepare RNN or TDNN network structures as DAG-like networks during conversion.
- Review an ONNX graph and follow the README’s described Kaldi-versus-MACE output comparison workflow.
Requirements & limits
The converter is described in a public GitHub repository under the Apache-2.0 license.
- Converter input must be a Kaldi text model; binary models require a preceding Kaldi conversion step.
- The conversion command needs model-specific context, modulus, chunk-size, subsample-factor and network-type values.
- The project identifies MACE as supporting Kaldi-ONNX operators; deployment requires an inference framework with Kaldi-specific operator support.
- The README describes broad, but not universal, Nnet2 and Nnet3 component support and directs users to
converter/common.pyfor the available list. - The README describes Android, iOS, Linux and Windows inference through MACE.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Convert a Kaldi text model to ONNX
Create an ONNX model from a supported Kaldi Nnet2 or Nnet3 text model.
Before you start
- Python dependencies installed with
pip install -r requirements.txt. - A Kaldi text model; binary models must first be converted to text with the relevant Kaldi copy tool.
- Left context, right context and modulus obtained with
nnet-am-infoornnet3-am-info. - Conversion parameters including chunk size, subsample factor and Nnet type.
Steps
Install the converter dependencies from
requirements.txt.Prepare a Kaldi text model. For binary Nnet2 or Nnet3 input, use the corresponding Kaldi copy utility; the README specifies
--raw=trueand--prepare-for-test=truefor the Nnet3 preparation example.Obtain the required context and modulus values using Kaldi’s information utility.
Run the command below with the documented input, output, transition-model, configuration, chunk-size, context, modulus, subsample-factor and network-type arguments.
python converter/convert.pyOptionally review the resulting ONNX graph with ONNX Model Viewer.
Expected outcome
An ONNX model file and the transition-model and configuration outputs specified in the conversion command.
Guide limitations
- Only Kaldi text models are accepted as converter input.
- The README says almost all Nnet2 and Nnet3 components are supported; check
converter/common.pyfor the available components. - The README does not detail supported model architectures beyond its stated Nnet2 and Nnet3 component coverage.
Compare options for Model inference and serving
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
| Project | Documented purpose | Platform | Access and requirements |
|---|---|---|---|
| Kaldi Onnx | Convert a Kaldi Nnet2 or Nnet3 text model into ONNX. | Android, iOS, Linux | The converter is described in a public GitHub repository under the Apache-2.0 license. |
| Hyperpose | Customize pose-estimation architectures and datasets. | Docker, Linux, macOS, Windows | |
| Multi Task Nlp | Define multiple tasks and their data and model settings in a YAML file. | Linux, macOS, Windows | The project is an open-source library under the Apache-2.0 license, distributed through its public GitHub repository. |
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- XiaoMi/kaldi-onnx · Official homepage title · retained in its source language

