k2-fsa

k2-fsa/sherpa-onnx

C++ Apache-2.0 AI & ML

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

13.5k stars
1.5k forks
active
GitHub +132 / week

13.5k

Stars

1.5k

Forks

596

Open issues

30

Contributors

AI Analysis

Sherpa-ONNX is a comprehensive speech AI toolkit enabling speech-to-text, text-to-speech, speaker diarization, speech enhancement, and related audio tasks entirely offline using ONNX Runtime. It excels at deployment on resource-constrained and edge devices (Raspberry Pi, embedded Linux, mobile platforms, NPUs) across 12 programming languages, serving developers and organizations requiring privacy-preserving, disconnected audio processing. It is not a general-purpose speech library but rather ...

AI & ML Library Discovery value: 6/10
Documentation 8/10
Activity 9/10
Community 8/10
Code quality 5/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

speech-recognition text-to-speech edge-ai offline-inference embedded-systems
Actively maintained Well documented Niche/specialized use case Popular Production ready
Deep Analysis · Based on README and public signals
2w ago

Offline speech AI toolkit for embedded and mobile: ASR, TTS, diarization, VAD across 12 languages and dozens of platforms

sherpa-onnx is a C++-core, ONNX-runtime-based library that runs a broad suite of speech AI functions—ASR (streaming and batch), TTS, speaker diarization, VAD, keyword spotting, source separation, and more—entirely offline. It targets embedded systems, mobile (Android, iOS, HarmonyOS), edge hardware (Raspberry Pi, RK NPU, Ascend NPU, RISC-V), and servers. With bindings for 12 programming languages and pre-built packages for each, it is aimed at developers who need production-ready, privacy-preserving speech AI without cloud dependency.

Origin

Spawned from the k2-fsa (next-gen Kaldi) lineage in September 2022, sherpa-onnx emerged as the deployment-focused counterpart to the research-oriented k2/lhotse stack, choosing ONNX Runtime for maximum portability across heterogeneous hardware.

Growth

Growth appears driven by the global demand for offline/on-device speech AI, growing interest in edge NPU hardware, and the practical frustration with cloud-only SDKs. Chinese developer communities (HarmonyOS, Axera, RK chips) contributed significantly to adoption. The 77 stars/week pace suggests steady, ongoing organic interest rather than viral spikes.

In production

Hugging Face Spaces demos are publicly accessible, indicating real-world demo usage. The presence of HarmonyOS, WearOS, and specific Chinese edge-board support (RK3588, 旭日X3派, 爱芯派) suggests real hardware deployments beyond hobbyist use. A Discord community exists. The 1,501 forks-to-star ratio (~11%) is higher than typical for pure-research repos, suggesting active integration by downstream projects. Specific production deployments are not individually documented in the README excerpt, so full production-scale adoption cannot be independently verified.

Code analysis
Architecture

Likely a C++ core library exposing a stable C API, with thin language-specific wrappers (Python, Java/Kotlin, Swift, Dart, etc.) built on top. ONNX Runtime handles inference across CPU and NPU backends. The README suggests a model-agnostic design: users supply ONNX model files, and the library handles pipeline logic. Streaming ASR likely uses a ring-buffer/chunk architecture. WebAssembly support suggests the core compiles to wasm via Emscripten.

Tests

Not documented in README

Maintenance

Last push on 2026-06-23 (the current date), indicating active daily development. With 13K+ stars and 1,500+ forks accrued over roughly 3.5 years and continuous recent commits, the project shows sustained, active maintenance rather than intermittent bursts. The breadth of platform additions (SpacemiT-K3, Axera NPU, QNN) in the README suggests an expanding scope driven by real hardware partners or user requests.

Honest verdict

ADOPT IF: you need offline/on-device speech AI (ASR, TTS, VAD, diarization) on embedded Linux, Android, iOS, HarmonyOS, or edge NPU hardware, and cloud dependency is not acceptable. AVOID IF: you need maximum ASR accuracy with no latency or resource constraints and can use server-side Python pipelines freely—cloud-native stacks will offer simpler model management. MONITOR IF: you are evaluating speech AI for desktop or mobile apps where offline capability is desirable but not yet a hard requirement, and want to track ecosystem maturity before committing.

Independent dimensions

Mainstream potential

5/10

Technical importance

9/10

Adoption evidence

6/10

Risks
  • Model management complexity: users must source and convert compatible ONNX models themselves, which may be a significant friction point for new adopters compared to cloud SDKs with managed model updates.
  • Documentation breadth vs. depth tradeoff: supporting 12 languages, 30+ platforms, and 10+ functions may mean per-integration documentation is thinner than specialized single-platform libraries.
  • Dependency on ONNX Runtime's own roadmap and NPU backend support: breakages in upstream ONNX Runtime or NPU-specific execution providers could cascade into sherpa-onnx.
  • Core team concentration risk: the k2-fsa organization appears to be a relatively small academic/research-affiliated group; bus-factor for the C++ core is unknown but potentially limited.
  • Rapidly evolving hardware landscape (new NPUs, SoCs) may create a maintenance burden that outpaces the team's capacity, leading to uneven platform support quality over time.
Prediction

Likely to consolidate its position as the reference offline speech AI deployment library for edge/embedded use cases, particularly in Asian hardware ecosystems. Mainstream adoption in Western cloud-first environments may remain limited, but its niche is durable and growing.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

No language breakdown available.

Information

Language
C++
License
Apache-2.0
Last updated
12h ago
Created
47mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

No commit data available.

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Open issues

No open issues — clean slate.

Open pull requests

No open pull requests.

Top contributors

Contributor data not available yet.

Recent releases

No releases published yet.

Similar repos

thewh1teagle

thewh1teagle/kokoro-onnx

kokoro-onnx is a text-to-speech (TTS) library that wraps the Kokoro TTS model...

2.6k Python AI & ML
FunAudioLLM

FunAudioLLM/SenseVoice

SenseVoice is a multilingual speech foundation model supporting ASR, emotion...

8.8k C AI & ML
fikrikarim

fikrikarim/parlor

Parlor is a self-contained, on-device multimodal AI assistant that runs voice...

1.9k HTML AI & ML
huggingface

huggingface/speech-to-speech

Speech-to-Speech is a modular, low-latency voice-agent pipeline that chains VAD...

5.8k Python AI & ML
OHF-Voice

OHF-Voice/piper1-gpl

Piper is a fast, local neural text-to-speech engine that runs offline and...

4.7k C++ AI & ML
vs. alternatives
modelscope/FunASR

FunASR (18K stars, Python) focuses on high-accuracy ASR models, primarily for server-side or cloud-assisted inference. sherpa-onnx targets embedded/offline/mobile deployment with a much broader function set and multi-language bindings. They serve partially overlapping but distinct deployment scenarios.

microsoft/onnxruntime

ONNX Runtime is the inference engine sherpa-onnx builds on top of. sherpa-onnx adds speech-specific pipeline logic, model management, streaming support, and platform packaging that raw ONNX Runtime does not provide. They are complementary, not competing.

openai/whisper

Whisper is a model family; sherpa-onnx can run Whisper as one of its supported backends. sherpa-onnx provides the deployment infrastructure (streaming, VAD integration, mobile bindings) that Whisper alone lacks.

alphacep/vosk

Vosk is the closest analog: offline ASR with mobile/embedded support. sherpa-onnx covers a broader function set (TTS, diarization, source separation), supports more recent model architectures, and explicitly targets NPU hardware, giving it an edge for newer edge deployments.

snakers4/silero-models

Silero provides VAD and ASR models in TorchScript/ONNX. sherpa-onnx explicitly supports Silero VAD as one of its backends, making it more of an integration consumer than a competitor. sherpa-onnx adds the full cross-platform deployment layer Silero models lack.