Skip to content
FossShelf
Home / Categories / For AI Engineers

Sherpa Onnx

Offline speech AI: ASR, TTS, VAD, and speaker tasks on any platform.

Replaces —

15.99K starsApache-2.0last commit 13 Nov 2026

Who it's for

Voice-Controlled IoT and Embedded Devices

Teams building voice assistants, smart speakers, or voice-controlled industrial equipment on embedded hardware. Sherpa-onnx runs on Raspberry Pi, Jetson, and RK NPU boards without cloud connectivity, making it viable for devices deployed in locations without reliable network access.

Your device has reliable internet access and per-minute billing from a cloud speech API is acceptable.

Privacy-Sensitive Transcription

Organizations that cannot send audio to external services: healthcare, legal, intelligence, and financial compliance teams. Sherpa-onnx processes audio entirely on-premises. The WebSocket server mode enables centralized deployment where client applications send audio to an internal server rather than to cloud infrastructure.

No audio privacy requirements apply and cloud transcription APIs are already approved for use.

Mobile App Voice Features

Android and iOS apps that need ASR or TTS without a network dependency. Flutter and Tauri integrations and pre-built Android APKs for testing lower the integration barrier. The Kotlin and Swift APIs map directly to platform-native development workflows.

The app already uses a cloud speech API and offline capability is not required.

Multilingual Server-Side Transcription

Server pipelines transcribing audio in multiple languages. SenseVoice supports Chinese, English, Korean, Japanese, and Cantonese in a single model. The streaming WebSocket server mode lets existing services call sherpa-onnx as a local speech backend without rebuilding inference infrastructure.

Only a single language is needed and a managed cloud transcription API is already in place.

The problem

Speech AI typically means cloud. Google, Azure, and Amazon all offer speech APIs that charge per audio minute, require sending raw audio to external servers, and go down when the network does. For applications where audio privacy matters, where network access is unreliable, or where per-use billing is not acceptable, cloud speech APIs create a fundamental mismatch between what the tools offer and what the use case requires. Building offline alternatives used to mean assembling a custom stack: a PyTorch model, a CUDA-capable GPU, a Python environment, and integration glue for every target language. Shipping that stack to an Android app, a Raspberry Pi, or a Windows desktop required separate work for each platform. Teams running IoT devices or air-gapped systems had no practical path to speech recognition without a network connection.

How it works

Offline-First Speech Recognition and Synthesis

Runs ASR and TTS locally using ONNX Runtime with no network calls during inference. Both streaming (real-time, word-by-word output) and non-streaming (batch file processing) modes are supported for ASR. Pre-trained models include Zipformer, Paraformer, Whisper, and SenseVoice architectures.

Twelve Speech Tasks in One Toolkit

One codebase handles ASR, TTS, VAD, speaker diarization, speaker identification, speaker verification, spoken language identification, audio tagging, keyword spotting, speech enhancement, source separation, and punctuation. Each task loads a separate ONNX model file and shares the same API pattern across all 12 supported languages.

Twenty-Plus Platform and Architecture Support

Runs on x86_64, arm64, arm32, and RISC-V. Tested on Linux, macOS, Windows, Android (including WearOS), iOS, HarmonyOS, Raspberry Pi, Jetson Nano, Jetson Orin, and multiple RK NPU and Ascend NPU embedded boards. Pre-built binaries are available for major desktop platforms without requiring compilation.

Twelve Programming Language APIs

Native bindings exist for C++, C, Python, Go, C#, Java, Kotlin, JavaScript, Swift, Rust, Dart, and Object Pascal. WebAssembly is also supported. The same offline speech capabilities are accessible from Android (Java or Kotlin), iOS (Swift), cross-platform apps (Flutter, Tauri), and server-side code without language-specific rewrites.

Hardware Accelerator Support

Beyond CPU inference, sherpa-onnx supports GPU acceleration via CUDA (11.8 and 12.x) and five NPUs: Rockchip (RKNN), Qualcomm (QNN), Ascend, Axera, and Intel (OpenVINO). This makes it usable on dedicated AI hardware common in embedded and edge deployment scenarios.

Features

  • Offline-First Speech Recognition and Synthesis
  • Twelve Speech Tasks in One Toolkit
  • Twenty-Plus Platform and Architecture Support
  • Twelve Programming Language APIs
  • Hardware Accelerator Support

How to install

Install the Python package from pre-compiled CPU wheels.

pip install sherpa-onnx

Recommended for this setup

Strengths

  • No Internet Connection Required During Inference: Every inference step runs on the local device. Audio never leaves the machine. For compliance-sensitive applications in healthcare, legal, government, and financial services, this makes sherpa-onnx viable where cloud APIs are blocked by policy.
  • Apache-2.0 License: Apache-2.0 allows commercial use, modification, and distribution without restriction. There is no copyleft requirement to open-source changes, and no separate commercial license is needed for production deployment.
  • Wide Embedded Platform Coverage: Unlike Python-first speech libraries that assume a CUDA-capable server, sherpa-onnx is tested on Raspberry Pi, Jetson Nano, RK3588, and RISC-V boards. The project provides cross-compilation toolchains and static build instructions for constrained hardware.
  • Pre-Built Models Available: The project maintains catalogs of pre-trained ONNX models for ASR, TTS, VAD, and other tasks, with Hugging Face Spaces for browser-based testing. Teams do not need to train models or export from PyTorch to start using the library.

Trade-offs

  • Model Management Is Manual: Sherpa-onnx does not include a model registry or automatic update mechanism. You download model files separately, manage their paths in configuration, and handle updates yourself. For a deployment with multiple models across multiple tasks, this creates operational overhead that cloud APIs handle transparently.
  • Growing Issue Queue: The repository has 560 open issues. For a project covering 12 tasks and 20+ platforms, this reflects the genuine surface area. Some platform-specific behaviors and model compatibility issues may not have documented fixes, and resolution timelines vary.
  • Embedded Targets Require Cross-Compilation: Desktop platforms have pre-built binaries. Embedded targets (custom Linux boards, RISC-V systems, NPU hardware) require cross-compilation from source using the provided toolchains. Teams without C++ build experience will need additional setup time before running on specialized hardware.

Tech stack

Languages
C++, Python, Dart, Shell, JavaScript, Rust, Kotlin, CMake, Java, C, Pascal, C#, Swift, Go, HTML, CSS, Ruby, TypeScript, Makefile, Jinja, Objective-C, Linker Script
Frameworks
—
Databases
—
Tooling
.NET, ONNX

FAQ

What speech tasks does sherpa-onnx support?

Sherpa-onnx covers twelve tasks: speech recognition (streaming and batch), text-to-speech, voice activity detection, speaker diarization, speaker identification, speaker verification, spoken language identification, audio tagging, keyword spotting, speech enhancement, source separation, and punctuation restoration. Each task loads a separate ONNX model file and uses the same API pattern across all 12 supported programming languages.

Which platforms and hardware does sherpa-onnx run on?

It runs on Linux (x86_64, arm64, arm32, RISC-V), macOS, Windows, Android (including WearOS), iOS, and HarmonyOS. Embedded boards with documented support include Raspberry Pi, Nvidia Jetson Nano and Orin, and RK3588. GPU inference is available via CUDA 11.8 and CUDA 12.x. Five NPUs are supported: Rockchip (RKNN), Qualcomm (QNN), Ascend, Axera, and Intel (OpenVINO).

What programming languages can I use with sherpa-onnx?

Twelve languages have native bindings: C++, C, Python, Go, C# (.NET), Java, Kotlin, JavaScript (Node.js), Swift, Rust, Dart (Flutter), and Object Pascal. WebAssembly is also supported, allowing sherpa-onnx to run speech tasks in browsers without a server-side component.

Do I need to train my own models?

No. The project maintains catalogs of pre-trained ONNX models for every supported task, hosted on Hugging Face and ModelScope. You download the model files for your target language and task, pass the paths in configuration, and use the API directly. For teams that need custom vocabulary or domain-specific accuracy, models can also be exported from icefall-trained PyTorch checkpoints to ONNX format.

Is sherpa-onnx suitable for production use?

Sherpa-onnx has 15,635 GitHub stars, 1,832 forks, and its last commit was in October 2026, indicating active maintenance. The Apache-2.0 license permits commercial production use without restriction. The open issue queue has 560 items; for platform-specific deployments, check whether issues for your target architecture appear in the tracker before committing to a production rollout.

Similar tools

More in AI Engineers