Local speech recognition, synthesis, and related audio ML using ONNX models without requiring an internet connection during inference.
Overview
sherpa-onnx brings speech and audio machine learning pipelines to devices using ONNX and onnxruntime instead of PyTorch at inference time. The documented scope covers speech-to-text (streaming and offline), text-to-speech, speaker diarization, identification, verification, language ID, audio tagging, voice activity detection, keyword spotting, source separation, forced alignment, punctuation, and speech enhancement.
Runs are intended to stay on-device: documentation states that speech recognition does not need network access while processing. Bindings and examples span many languages, including C++, Python, Java, Kotlin, JavaScript, Go, C#, Swift, Rust, and others, plus WebAssembly and Flutter or Tauri demo apps. Hardware coverage in the materials lists x86, ARM, RISC-V, Android, iOS, HarmonyOS, embedded boards, and several NPU backends.
Pre-built binaries, APKs, and demo releases are linked for trying features on phones and desktops. Hugging Face and ModelScope spaces offer browser trials. Optional websocket server and client modes appear in the broader docs for streaming setups.
Models are distributed separately; the project describes how to export or obtain ONNX assets and compile the runtime for Linux, macOS, Windows, and embedded targets.
Key features
- Offline speech-to-text
- Text-to-speech synthesis
- Speaker diarization and verification
- Voice activity detection
- Keyword spotting
- Source separation
- Forced word alignment
- Multi-language API bindings
Use cases
- Embedded offline speech recognition
- Local TTS on mobile devices
- On-device voice assistants
- CPU inference without cloud APIs
- Streaming ASR prototypes