k2-fsa/sherpa-ncnn
Real-time speech recognition and voice activity detection (VAD) using next-gen Kaldi with ncnn without Internet connection. Support iOS, Android, Linux, macOS, Windows, Raspberry Pi, VisionFive2, LicheePi4A etc.
sherpa-ncnn is a lightweight toolkit that runs three kinds of speech AI directly on your device — no cloud server needed:
- Real-time speech recognition (streaming speech-to-text): converts spoken words into text as you speak.
- Speech synthesis (text-to-speech): converts written text into spoken audio, using VITS models from the Piper project.
- Voice activity detection (VAD): detects whether someone is speaking in an audio stream, using Silero VAD models.
It's designed to run on a huge range of hardware and operating systems: from phones (Android, iOS, WearOS) to desktops (Windows, macOS, Linux, openKylin), plus single-board computers like Raspberry Pi, RISC-V boards (e.g., VisionFive 2, LicheePi4A), and even web browsers via WebAssembly. The README lists support for x86, x64, 32-bit ARM, 64-bit ARM, and RISC-V architectures.
You can call it from many programming languages: C++, C, Python, JavaScript, Go, C#, Kotlin, and Swift.
A key technical point: it does not depend on PyTorch or any other heavy inference framework — only on ncnn, a lightweight neural network inference library from Tencent. Everything can be compiled from source with static linking, meaning the resulting executable only depends on system libraries, which makes it easy to deploy.
The project provides pre-built Android APKs for streaming speech recognition, pre-trained models, documentation, and demo videos. It's part of the "next-generation Kaldi" ecosystem (the README links to related projects sherpa-onnx and sherpa).
Related
- Project
- Project
- Project
- Project