Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving
sherpa-onnx
github.com/k2-fsa/sherpa-onnxSpeech-to-text, text-to-speech, speaker diarization, speech enhancement, source separation, and VAD using next-gen Kaldi with onnxruntime without Internet…
git clone https://github.com/k2-fsa/sherpa-onnx- Stars
- 16k
- Rank in field
- Top 19%#98 of 542 by stars
- Forks
- …
- Open issues
- …
- Contributors
- …
- Language
- C++
- License
- Apache-2.0
- Last push
- 24 Nov 2026
What is sherpa-onnx?
sherpa-onnx runs speech functions locally using next-gen Kaldi with onnxruntime, without needing an internet connection. It covers speech-to-text (streaming and non-streaming), text-to-speech, speaker diarization, identification and verification, language identification, audio tagging, VAD, speech enhancement, keyword spotting, source separation and forced alignment. It targets developers building on-device audio features across desktop, mobile, embedded and web platforms.
Install & use
git clone https://github.com/k2-fsa/sherpa-onnx.git
# open k2-fsa/sherpa-onnx and follow its README
k2-fsa/sherpa-onnx is a third-party open-source project, listed here from public GitHub data. ImuTechz did not write it and has not reviewed or security-audited its code. Read the source and its permissions before you install or run it.
Features
- Speech-to-text with streaming and non-streaming modes
- Text-to-speech and speaker diarization, identification and verification
- Voice activity detection, speech enhancement and source separation
- Keyword spotting, audio tagging and spoken language identification
- Forced alignment for word-level timestamps
- APIs for C++, C, Python, Go, C , Java, Kotlin, JavaScript, Swift, Rust, Dart and Object Pascal
Best for
- On-device speech recognition without internet access
- Mobile and embedded audio apps on Android, iOS, HarmonyOS and Linux
- Browser-based speech features via WebAssembly
- Speaker diarization and verification pipelines
Pros
- Runs all listed functions locally without an internet connection
- Supports many platforms including Android, iOS, Windows, macOS, Linux, HarmonyOS and WebAssembly
- Provides bindings for twelve programming languages
- Supports several NPUs including Rockchip, Qualcomm, Ascend, Axera and Intel
Cons
- Requires onnxruntime as the inference backend
- Some functions depend on specific external models such as silero-vad, gtcrn, spleeter or UVR
Stars over time