istupakov/onnx-asr
A lightweight Python package for Automatic Speech Recognition using ONNX models
What it solves
onnx-asr provides a lightweight, high-performance way to run Automatic Speech Recognition (ASR) models without needing heavy dependencies like PyTorch, Transformers, or FFmpeg. It simplifies the process of running modern speech-to-text models by handling the complex preprocessing and decoding steps required for ONNX-based models.
How it works
The package uses the ONNX Runtime to execute speech models. It includes built-in implementations for log-mel spectrogram preprocessing and greedy search decoding, which are necessary to turn raw audio into text. You can load models directly from Hugging Face or local files, and the package handles audio file reading and resampling automatically. It supports various hardware acceleration backends, including CUDA, TensorRT, CoreML, and WebGPU.
Who it’s for
This tool is designed for developers who need to integrate speech recognition into applications running on anything from small IoT/edge devices to high-end servers. It is ideal for those who want a minimal, fast, and easy-to-use Python API for ASR without the overhead of massive machine learning frameworks.
Highlights
- Supports a wide range of modern architectures including NVIDIA NeMo (Parakeet, Canary), GigaAM, Kaldi Icefall, Wav2Vec2, and OpenAI Whisper.
- Runs on Windows, Linux, and macOS across x86 and Arm architectures.
- Includes Voice Activity Detection (VAD) for processing long audio files.
- Provides a command-line interface (CLI) and a fully typed Python API.
- Supports batch processing and can return granular data like token-level timestamps and log probabilities.
Related
- Project
- Project
- Project
- Project
- Project