sherpa-onnx
What it is and what it does
Sherpa-onnx is a Python wrapper around ONNX Runtime for running speech and audio AI models locally without cloud dependencies. It supports a wide range of tasks—speech-to-text (streaming and offline), text-to-speech, speaker identification and diarization, voice activity detection, keyword spotting, audio tagging, speech enhancement, and source separation—across diverse platforms including Linux, macOS, Windows, Android, iOS, and specialized hardware like Raspberry Pi and NVIDIA Jetson boards.
The package is built on ONNX Runtime and requires sherpa-onnx-core as its runtime dependency. It targets developers who need on-device audio AI without external API calls, with support for multiple programming languages and NPU accelerators (Rockchip, Qualcomm, Ascend). Installation uses prebuilt wheels for Python 3.7+ on common architectures, though model files must be obtained separately.
Use it for:
- Build offline speech-to-text applications for edge devices or privacy-sensitive environments
- Add real-time voice commands and keyword spotting to embedded systems or IoT devices
- Implement speaker identification or diarization for audio analysis and meeting transcription
- Deploy text-to-speech synthesis on mobile or server applications without cloud API costs
- Process audio locally on Raspberry Pi, Jetson, or other ARM-based platforms
- Integrate voice activity detection or speech enhancement into audio pipelines
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Sherpa-onnx runs speech recognition, text-to-speech, speaker identification, voice activity detection, keyword spotting, and other audio processing tasks locally using ONNX models across multiple platforms and architectures.
Yes. Sherpa-onnx is actively maintained, permissively licensed, has no known vulnerabilities, and offers broad platform and task coverage for local audio AI. Install it if you need on-device speech or audio processing without external dependencies. The medium install friction is offset by prebuilt wheels and strong community adoption.
Install
sherpa-onnx on PyPI
pip
pip install sherpa-onnxuv
uv add sherpa-onnxpoetry
poetry add sherpa-onnxInstalling sherpa-onnx
Before you install
Medium install friction due to compiled wheels for multiple Python versions and architectures; however, prebuilt wheels are available for common platforms (Linux x86_64, macOS, Windows, ARM variants). Active maintenance with recent releases (3 days since last update) and 14181 repository stars suggest reliable ongoing support.
License in practice
Apache licensed under permissive terms, allowing commercial and private use with minimal restrictions; suitable for most production and proprietary projects.
Quickstart
pip install sherpa-onnx
import sherpa_onnx
# Requires a pre-trained ONNX model file and audio input
recognizer = sherpa_onnx.OfflineRecognizer.from_pretrained(...)
result = recognizer.recognize(audio_data)
Requires a pre-trained ONNX model file (not included in the package); audio input must be in a supported format.
Verify before relying
- Whether pre-trained models are bundled or must be downloaded separately
- Performance characteristics (latency, memory usage) on different hardware
- Supported audio formats and sample rates for each task
- Whether GPU acceleration is available or only CPU inference
Package facts
| License | Apache licensed, as found in the LICENSE file (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — sherpa-onnx-core |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 634,735/month — #5,642 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sherpa_onnx-1.13.5-cp310-cp310-linux_armv7l.whl; sherpa_onnx-1.13.5-cp310-cp310-macosx_10_15_universal2.whl; sherpa_onnx-1.13.5-cp310-cp310-macosx_10_15_x86_64.whl; sherpa_onnx-1.13.5-cp310-cp310-macosx_11_0_arm64.whl; sherpa_onnx-1.13.5-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; sherpa_onnx-1.13.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; sherpa_onnx-1.13.5-cp310-cp310-win32.whl; sherpa_onnx-1.13.5-cp310-cp310-win_amd64.whl; sherpa_onnx-1.13.5-cp311-cp311-linux_armv7l.whl; sherpa_onnx-1.13.5-cp311-cp311-macosx_10_15_universal2.whl; sherpa_onnx-1.13.5-cp311-cp311-macosx_10_15_x86_64.whl; sherpa_onnx-1.13.5-cp311-cp311-macosx_11_0_arm64.whl; sherpa_onnx-1.13.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; sherpa_onnx-1.13.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; sherpa_onnx-1.13.5-cp311-cp311-win32.whl; sherpa_onnx-1.13.5-cp311-cp311-win_amd64.whl; sherpa_onnx-1.13.5-cp311-cp311-win_arm64.whl; sherpa_onnx-1.13.5-cp312-cp312-linux_armv7l.whl; sherpa_onnx-1.13.5-cp312-cp312-macosx_10_15_universal2.whl; sherpa_onnx-1.13.5-cp312-cp312-macosx_10_15_x86_64.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
funasrFunASR is a speech recognition toolkit that…
permissive · top 15,000 on PyPI
onnx-asrAutomatic Speech Recognition using ONNX models…
permissive · top 15,000 on PyPI
sherpa-onnx-coresherpa-onnx-core provides pre-built ONNX…
permissive · top 15,000 on PyPI
silero-vadSilero VAD detects speech activity in audio…
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
voskVosk provides offline speech recognition for…
permissive · top 15,000 on PyPI
qwen-asrQwen3-ASR provides speech recognition and…
permissive · top 15,000 on PyPI
wyomingWyoming is a peer-to-peer TCP protocol for…
permissive · top 15,000 on PyPI
pvporcupinePorcupine is a lightweight wake word detection…
permissive · top 15,000 on PyPI