istupakov/onnx-asr

A lightweight Python package for Automatic Speech Recognition using ONNX models

What it solves

onnx-asr is a lightweight Python package designed to make Automatic Speech Recognition (ASR) fast and easy to deploy. It removes the heavy dependencies typically associated with speech-to-text, such as PyTorch, Transformers, or FFmpeg, allowing ASR models to run on everything from small IoT/edge devices to powerful GPU servers.

How it works

The project provides the necessary preprocessing (log-mel spectrograms) and decoding (greedy search) implementations to run modern ASR models exported to the ONNX format. It supports a wide variety of architectures, including NVIDIA NeMo (Parakeet, Canary), GigaAM, Kaldi Icefall Zipformer, Wav2Vec2, and OpenAI Whisper.

Who it’s for

Developers who need to implement speech recognition in Python without the overhead of large ML frameworks, particularly those targeting edge devices, IoT, or high-performance server environments across Windows, Linux, and macOS.

Highlights

  • Minimal Dependencies: Requires only NumPy and ONNX Runtime, avoiding heavy frameworks like PyTorch.
  • Broad Hardware Support: Compatible with x86 and Arm CPUs, and supports acceleration via CUDA, TensorRT, CoreML, DirectML, ROCm, and WebGPU.
  • Flexible Model Loading: Loads models directly from Hugging Face or local directories, including quantized versions.
  • Advanced ASR Features: Supports batch processing, token-level timestamps, log probabilities, and long-form recognition via Voice Activity Detection (VAD).
  • Wide Model Support: Compatible with various modern architectures like NeMo Conformer, GigaAM, and Whisper.

Related

  • Project
  • Project
  • Project
  • Project
  • Project