onnx-asr
A lightweight Python package for Automatic Speech Recognition using ONNX models
What it is and what it does
onnx-asr is a Python library for speech-to-text inference using ONNX-format models. It wraps modern ASR architectures (NeMo Conformer/Parakeet/Canary, GigaAM, Kaldi Icefall Zipformer, T-Tech T-one, and OpenAI Whisper) with preprocessing and decoding logic, letting you load a model and transcribe audio in a few lines of code. The package is designed to be lightweight—it requires only numpy and typing-extensions, avoiding heavy dependencies like PyTorch or Transformers—and runs on diverse hardware from IoT devices to GPU servers.
You provide either a WAV file or NumPy array, and the package handles resampling, log-mel spectrogram computation, and greedy-search decoding. It supports batch processing, Voice Activity Detection for long-form audio, token-level timestamps, and log probabilities. Models load from Hugging Face or local directories, including quantized versions. The library is actively maintained, fully typed, and includes both a Python API and a command-line interface.
Use it for:
- Transcribe audio files offline without cloud dependencies or heavy ML frameworks in production services.
- Build speech-to-text features on edge devices or IoT hardware with constrained resources.
- Process long-form audio recordings using Voice Activity Detection to split and recognize speech segments.
- Integrate multilingual ASR (Parakeet v3, Canary, GigaAM Multilingual) into applications requiring non-English transcription.
- Benchmark or compare ONNX-based ASR models across different hardware (CPU, CUDA, TensorRT, CoreML).
- Develop custom ASR pipelines by loading quantized or fine-tuned ONNX models from Hugging Face.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Automatic Speech Recognition using ONNX models with minimal dependencies, supporting multiple modern ASR architectures and running on CPUs, GPUs, and edge devices.
Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and solves a real problem—lightweight offline speech recognition without PyTorch or heavy dependencies. It supports modern models and diverse hardware. No known vulnerabilities. Install it if you need ASR inference in Python without framework overhead.
Install
onnx-asr on PyPI
pip
pip install onnx-asruv
uv add onnx-asrpoetry
poetry add onnx-asrInstalling onnx-asr
Before you install
Low friction: pure Python wheel with only numpy and typing-extensions as runtime dependencies. Active maintenance with a release 30 days ago and 361 repository stars. Supports Python 3.10 through 3.14.
License in practice
MIT license (permissive) allows commercial and private use with minimal restrictions.
Quickstart
pip install onnx-asr[cpu,hub]
import onnx_asr
model = onnx_asr.load_model("nemo-parakeet-tdt-0.6b-v3")
result = model.recognize("test.wav")
print(result)
Most models have a maximum audio length of 20–30 seconds; longer audio requires Voice Activity Detection (VAD).
Verify before relying
- Whether the package's claimed support for CUDA, TensorRT, CoreML, DirectML, ROCm, and WebGPU requires additional system libraries or environment setup beyond pip install.
- Performance characteristics on specific hardware (e.g., actual RTFx values on your target device) beyond the published benchmarks.
- Whether quantized model variants are automatically downloaded or require manual setup.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — numpy, typing-extensions |
| Maintenance | actively maintained — 30 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 230,295/month — #9,113 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: onnx_asr-0.12.0-py3-none-any.whl
Keywords: asr, onnx, speech-recognition, speech-to-text, stt
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
sherpa-onnxSherpa-onnx runs speech recognition,…
permissive · top 15,000 on PyPI
sherpa-onnx-coresherpa-onnx-core provides pre-built ONNX…
permissive · top 15,000 on PyPI
funasrFunASR is a speech recognition toolkit that…
permissive · top 15,000 on PyPI
nemo-toolkitnemo-toolkit provides a PyTorch framework for…
permissive · top 5,000 on PyPI
pocketsphinxPocketSphinx provides Python bindings for…
permissive · top 15,000 on PyPI
SpeechRecognitionPerforms speech recognition and transcription…
permissive · top 5,000 on PyPI
silero-vadSilero VAD detects speech activity in audio…
permissive · top 5,000 on PyPI
whisperxWhisperX performs fast automatic speech…
permissive · top 5,000 on PyPI
qwen-asrQwen3-ASR provides speech recognition and…
permissive · top 15,000 on PyPI
speechbrainSpeechBrain is a PyTorch-based toolkit for…
permissive · top 5,000 on PyPI