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.

15,929 stars1,874 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 1 day 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 November 13, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • k2-fsa/sherpa-onnx15,929 ★ · +2,077
Star history
Repository2026-07-292026-11-13
k2-fsa/sherpa-onnx13.9k15.9k

2,077 Stars in the last 107 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial 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 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 enhancement, you feed noisy audio and get 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. The first hurdle is finding the right model files. The project does not ship models in the repository; it links to external sources. The exact steps vary by function and model type, so consult the documentation. 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.

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.8 on 2026-09-10, then v2.0.0 and v2.0.1 in late October 2026), 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, to compare the accuracy of a given model running under sherpa-onnx against a cloud service, plan on 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 Apache-2.0 licence covers the project itself, not 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 October 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 v2.0.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.

Frequently asked questions

What is sherpa ONNX?

A speech and audio processing toolkit from the Kaldi group that runs entirely on the local machine with no internet connection, written mostly in C++. It covers speech recognition in both streaming and non-streaming modes, text-to-speech, speaker diarization, speaker identification and verification, spoken language identification, audio tagging, voice activity detection, speech enhancement, keyword spotting, source separation and adding punctuation. It is licensed under Apache-2.0 and currently at version 2.0.1.

how to use sherpa onnx

Pick a language binding from the twelve listed; several have an examples directory at the top of the repository, such as c-api-examples, cxx-api-examples, go-api-examples and java-api-examples. The Python package installs from a package index and names a minimum Python of 3.7. It also runs without installation at all, since the project maintains hosted spaces where you can try recognition, synthesis, diarization, subtitle generation and source separation from a browser, and there are also spaces built using WebAssembly.

what is sherpa onnx tts

Text-to-speech is one of the listed supported functions, alongside speech recognition, diarization and the rest. It has its own WebAssembly build script, separate from the other WebAssembly targets, and one of the iOS build scripts is explicitly a variant with text-to-speech removed, which suggests it pulls in a dependency the other tasks do not need.

Is sherpa onnx safe?

The front page does not make a safety claim, but the architecture points one way: every function runs locally with no internet connection, so audio does not leave the device. It is licensed under Apache-2.0. A separate document covers one specific accelerator integration, and the project publishes its source in full with a changelog.

What are the releases of k2-fsa/sherpa-ONNX?

The three most recent are version 2.0.1 from 2026-10-26, version 2.0.0 from 2026-10-23, and version 1.13.8 from 2026-09-10. The repository also carries separate release tags for pre-built Flutter and Tauri demo apps, so filter on numbered tags when pinning.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/k2-fsa-sherpa-onnx.svg)](https://hysenlabs.com/projects/k2-fsa-sherpa-onnx)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/k2-fsa-sherpa-onnx.svg)](https://hysenlabs.com/projects/k2-fsa-sherpa-onnx)

Was this useful?