Open-source project
k2-fsa/sherpa-onnx avatar
k2-fsa/sherpa-onnx

sherpa-onnx: A local speech toolkit that spans ASR, TTS, diarization, and NPUs

Speech-to-text, text-to-speech, speaker diarization, speech enhancement, source separation, and VAD using next-gen Kaldi with onnxruntime without Internet connection. Support embedded systems, Android, iOS, HarmonyOS, Raspberry Pi, RISC-V, RK NPU, Axera NPU, Ascend NPU, x86_64 servers, websocket server/client, support 12 programming languages.

14,779 stars1,698 forksC++Apache-2.0

At a glance

What is it?
sherpa-onnx bundles speech-to-text, text-to-speech, speaker diarization, enhancement, and more into one ONNX-based runtime that works offline on everything from RISC-V boards to x86 servers. The trade-off is breadth over depth: you get many functions, but you must assemble models and pick your platform carefully.
Who is it for?
Adopt sherpa-onnx if you need offline speech processing on constrained or heterogeneous hardware and you are comfortable managing model files yourself. It is the wrong choice if you want a single vendor-supported model zoo or a managed cloud service.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What sherpa-onnx actually bundles

The repository is a single C++ codebase that exposes speech recognition, text-to-speech, speaker diarization, speaker identification and verification, spoken language identification, audio tagging, voice activity detection, speech enhancement, keyword spotting, punctuation insertion, and source separation. All of it runs locally, with no internet connection required. The intended user is an engineer building an embedded appliance, a mobile app, or a server that must process audio without sending it to a cloud API. The README lists support for Android, iOS, HarmonyOS, Raspberry Pi, RISC-V, and several NPU families including Rockchip RKNN, Qualcomm QNN, Ascend, and Axera. That breadth is the core selling point. The cost is that you are not getting a polished product; you are getting a runtime and a set of examples. You still have to find models, convert them to ONNX if needed, and write the glue code.

How it works: ONNX models plus a thin runtime

The project name says it directly: sherpa-onnx uses onnxruntime as its inference engine. The README does not describe the internal architecture in detail, but the pattern is clear from the repository structure and the supported functions. You load an ONNX model file for each task, feed it audio, and get text or labels back. For ASR, both streaming and non-streaming modes are supported, meaning you can choose a model that processes chunks incrementally or one that waits for the full utterance. For TTS, you feed text and get audio out. For diarization and enhancement, you feed multi-speaker or noisy audio and get separated or cleaned audio. The runtime is written in C++, but it exposes bindings for C, Python, JavaScript, Java, C#, Kotlin, Swift, Go, Dart, Rust, and Pascal. That is twelve languages, which is unusual. The practical implication is that the same core logic can be reused across a mobile app, a web front end, and a backend service without rewriting the inference code.

Getting it running: commands and config are minimal but model-heavy

The README points to prebuilt demo apps for Flutter and Tauri, and to Hugging Face Spaces where you can try functions in a browser. For local use, the documentation (linked from the homepage) provides installation and usage examples, but the README itself does not include a single command line. That means the first hurdle is finding the right model files. The project does not ship models in the repository; it links to external sources. A typical workflow, based on the project's pattern, would be: download a model like a Zipformer ASR model, convert or place it in a directory, then call the Python or C++ API with the model path and config keys such as `--tokens`, `--encoder`, `--decoder`, or `--model` depending on the task. The exact keys vary by function and model type. The README does not give a canonical example, so you must consult the docs. This is a real friction point. If you are used to `pip install` and a ready model, sherpa-onnx will feel under-documented at first.

Platform matrix: impressive but not uniform

The support table shows x64, x86, arm64, arm32, and riscv64 across Linux, Windows, macOS, Android, iOS, and HarmonyOS. But the matrix is not uniform. For example, iOS only lists arm64, not x64. Windows does not list arm32. RISC-V appears only on Linux. The NPU support is separate: RKNN, QNN, Ascend, and Axera are listed, but not for every board. The README names specific devices like RK3588, LicheePi4A, VisionFive 2, and NVIDIA Jetson Orin NX, which suggests that the maintainers test on those boards, but it does not guarantee that every function works on every board. If you target an unusual architecture, you should assume that some features, especially NPU acceleration, may require extra work or may not be available. The breadth is real, but the depth per platform is uneven. That is a trade-off the README does not address.

The real limitation: model acquisition and integration burden

The biggest practical limitation is that sherpa-onnx is a runtime, not a model provider. The README lists supported functions and gives examples of models like silero-vad, gtcrn, spleeter, and UVR, but it does not include those models. You must source them, verify they are in ONNX format, and ensure they are compatible with the version of sherpa-onnx you use. The project releases new versions frequently (v1.13.6, v1.13.5, v1.13.4 within weeks), which suggests active development but also potential churn in model compatibility. If you rely on a specific model that is not in the official examples, you may have to convert it yourself. For a production system, that is a significant engineering cost. Also, the README does not mention any quality metrics, such as word error rate or latency, so you cannot compare the accuracy of a given model running under sherpa-onnx against a cloud service without running your own benchmarks.

A real alternative: Vosk or faster-whisper for narrower scope

If you only need offline speech-to-text, a project like Vosk (also Apache-2.0) offers a simpler path: it provides prebuilt models and a straightforward Python API, but it does not cover TTS, diarization, or enhancement. Faster-whisper is another alternative for ASR only, using CTranslate2 instead of onnxruntime, and it focuses on speed and accuracy for Whisper models. The difference in approach is that Vosk and faster-whisper are single-purpose: you install them, download a model, and run. sherpa-onnx is a multi-function toolkit, so you get more capabilities but also more complexity. If your project only needs ASR, the narrower tools will get you to a working system faster. If you need two or more functions on the same device, sherpa-onnx avoids maintaining multiple runtimes, which is its genuine advantage.

Maintenance and license: Apache-2.0 but model licenses vary

The project itself is licensed under Apache-2.0, which is permissive for commercial use. The README does not specify the license of the models it links to, and that is a critical point. Models like Whisper have their own licenses, and some NPU-specific models may have restrictions. You must check each model's license separately. The project is actively maintained, with releases every few weeks and a last push in August 2026. That is a positive sign for bug fixes and new features, but it also means you should pin a specific version in your build. The repository is not archived, and the release cadence suggests the maintainers are responsive. However, the documentation is spread across the README, the homepage, and external doc links, so upgrade notes are not always obvious. Plan for a few hours of reading the docs and testing a new release before adopting it in production.

Editorial conclusion

Adopt sherpa-onnx if you need offline speech processing on constrained or heterogeneous hardware and you are comfortable managing model files yourself. It is the wrong choice if you want a single vendor-supported model zoo or a managed cloud service. Before committing, verify that the specific model you need (for example, a streaming ASR model or a diarization pipeline) has a prebuilt example for your target architecture, and check the release notes for the latest v1.13.x changes. Start with a Hugging Face Space or a prebuilt Flutter demo to confirm the function works, then build the C++ or Python API into your project.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Community notes

Community notes