Blog / · GH-Proxy Team

sherpa-onnx: Offline Speech ASR & TTS Engine

When integrating voice interaction into modern applications, developers often face a tough dilemma.

Relying on cloud-based commercial APIs (such as Azure Speech, Google Cloud Speech, or the OpenAI Whisper API) quickly creates escalating monthly bills, introduces network latency, and raises critical data privacy and compliance concerns. On the other hand, compiling traditional open-source speech recognition engines often turns into a dependency nightmare, requiring gigabytes of tools that struggle to run on embedded devices, Raspberry Pi boards, or mobile phones.

Created under the leadership of speech recognition pioneer Daniel Povey (the creator of Kaldi) and the next-generation Kaldi team, k2-fsa/sherpa-onnx redefines what is possible with edge speech processing.

Boasting more than 15,800+ GitHub Stars, sherpa-onnx leverages the lightweight ONNX Runtime to provide 100% offline, zero-network-dependency, cross-platform voice AI capabilities.


🌟 Key Strengths: Why Choose sherpa-onnx?

1. Comprehensive Speech Suite in a Single Engine

sherpa-onnx is not limited to speech-to-text; it delivers an end-to-end suite of audio and speech capabilities:

  • Real-Time Streaming ASR: Transcribes speech as you talk with first-word latency under 100 milliseconds, ideal for live subtitles, voice assistants, and hardware remotes;
  • Non-Streaming ASR: Transcribes recorded audio files with state-of-the-art models including Zipformer, Paraformer, Whisper, and SenseVoice;
  • High-Fidelity Offline TTS: Generates natural speech locally using VITS, Matcha-TTS, Piper, and Pocket-TTS models;
  • Voice Activity Detection (VAD) & Punctuation: Employs Silero VAD and TEN VAD to slice audio silence and restore punctuation;
  • Speaker Diarization & Verification: Identifies who spoke when using CAM++ and 3D-Speaker architectures.

2. Broad Cross-Platform and Language Support

Whether developing for desktops, mobile apps, or headless microcontrollers, sherpa-onnx integrates cleanly:

  • Operating Systems: Windows, macOS, Linux, Android, iOS, HarmonyOS, Raspberry Pi, and RISC-V platforms;
  • 12 Programming Languages: Native APIs for C++, C, Python, Go, Rust, Java, Kotlin, Swift, C#, Dart, and JavaScript;
  • Modern Frameworks: First-class support for Flutter and Tauri cross-platform application frameworks.

3. NPU Edge Hardware Acceleration

sherpa-onnx extracts maximum inference efficiency from low-power NPUs without requiring power-hungry dedicated GPUs, supporting Rockchip (RKNN), Qualcomm (QNN), Huawei Ascend, Axera, and Intel OpenVINO.


⚡ High-Speed Binaries and Models Download (via GH-Proxy Edge CDN)

The project distributes official pre-compiled executables and pre-trained acoustic models through GitHub Releases. Because acoustic models and cross-platform shared libraries can reach hundreds of megabytes or even exceed a gigabyte, direct downloads in network-constrained environments frequently experience timeouts or sluggish speeds.

Using the GH-Proxy global CDN acceleration network, you can download all releases and model archives at full connection speed:

1. One-Click Web Resolution

👉 Open GH-Proxy Portal for sherpa-onnx Releases
(Direct resolver URL: https://gh-proxy.com/https://github.com/k2-fsa/sherpa-onnx)

Category & ArchitectureFile Name & DescriptionFile SizeGH-Proxy High-Speed Link
Windows x64 ASR Toolsherpa-onnx-streaming-asr-x64-v2.0.1.exe
(Standalone real-time microphone ASR)
~22.6 MBDownload Windows Streaming ASR
Windows x64 TTS Toolsherpa-onnx-non-streaming-tts-x64-v2.0.1.exe
(Standalone offline text-to-speech)
~22.6 MBDownload Windows Offline TTS
Linux x64 Prebuilt Suitesherpa-onnx-v2.0.1-linux-x64-shared.tar.bz2
(Includes shared C/C++ libraries and CLI)
~15.2 MBDownload Linux x64 Package
macOS Apple Siliconsherpa-onnx-v2.0.1-osx-arm64-shared.tar.bz2
(Optimized for M1/M2/M3/M4 chips)
~14.4 MBDownload macOS ARM64 Package
Android Developmentsherpa-onnx-2.0.1.aar
(Official Android AAR package)
~49.4 MBDownload Android AAR
Chinese Streaming Modelsherpa-onnx-streaming-zipformer-zh-14M-2023-02-23.tar.bz2
(Lightweight 14M model for embedded/mobile)
~74 MBDownload Chinese Zipformer Model

3. Accelerated Git Clone

Developers can clone the repository and explore code samples via the GH-Proxy mirror:

# Clone the repository using GH-Proxy
git clone https://gh-proxy.org/https://github.com/k2-fsa/sherpa-onnx.git

# Explore rich Python, C++, and Flutter examples
cd sherpa-onnx
ls -la python-api-examples/

🛠️ Quick Start: Test Offline Speech Recognition in 30 Seconds

Using the official Python bindings, you can test microphone transcription locally with minimal setup.

Step 1: Install Package and Download Model

Run the following in your terminal:

# Install the runtime and audio input library
pip install sherpa-onnx sounddevice

# Download the lightweight Chinese streaming model via GH-Proxy
wget https://gh-proxy.org/https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-zh-14M-2023-02-23.tar.bz2
tar xvf sherpa-onnx-streaming-zipformer-zh-14M-2023-02-23.tar.bz2

Step 2: Launch Real-Time Microphone Transcription

Execute the built-in streaming microphone test utility:

# Speak into the microphone and watch text appear in real time
python3 -m sherpa_onnx.cli.streaming_microphone \
  --tokens=./sherpa-onnx-streaming-zipformer-zh-14M-2023-02-23/tokens.txt \
  --encoder=./sherpa-onnx-streaming-zipformer-zh-14M-2023-02-23/encoder-epoch-99-avg-1.onnx \
  --decoder=./sherpa-onnx-streaming-zipformer-zh-14M-2023-02-23/decoder-epoch-99-avg-1.onnx \
  --joiner=./sherpa-onnx-streaming-zipformer-zh-14M-2023-02-23/joiner-epoch-99-avg-1.onnx

Zero cloud transmission, zero API costs, and low latency transcription running directly on your CPU.


🎯 Summary and Official Navigation

sherpa-onnx offers an engineering-focused, production-grade foundation for edge AI and offline speech applications.

💬 Comments & Discussion

Scroll down to load comments
(or click here to load immediately)