k2-fsa/sherpa-onnx

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

What it solves

Sherpa-onnx provides a highly portable, local-first approach to speech and audio processing. It eliminates the need for cloud-based APIs by allowing developers to run complex audio AI models—such as speech-to-text, text-to-speech, and speaker identification—directly on a wide variety of hardware platforms and operating systems.

How it works

The project leverages the ONNX Runtime to execute pre-trained models locally. It provides a comprehensive set of APIs across numerous programming languages (including C++, Python, Go, Rust, and Swift) and supports a vast array of architectures (x86, ARM, RISC-V) and specialized hardware accelerators like NPUs (Rockchip, Qualcomm, Ascend, Intel OpenVINO).

Who it’s for

Developers building audio-centric applications that require low latency, privacy, or offline capability across mobile (Android, iOS), desktop (Windows, macOS, Linux), and embedded systems (Raspberry Pi, NVIDIA Jetson).

Highlights

  • Extensive Audio Suite: Supports ASR (streaming and non-streaming), TTS, speaker diarization, VAD, keyword spotting, and source separation.
  • Massive Platform Support: Compatible with almost every major OS and architecture, including WebAssembly and HarmonyOS.
  • Broad Language API: Offers bindings for 12+ programming languages, making it easy to integrate into existing codebases.
  • NPU Acceleration: Native support for various NPUs to improve performance on edge devices.

Related

  • Project
  • Project
  • Project
  • Project
  • Project