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.
Featured achievements
The project's latest awards
#2 Repository of the week
#9 Repository of the week
#2 Repository of the week
Supported functions
| Real-time Speech recognition | Speech synthesis | Voice activity detection |
|---|---|---|
| ✔️ | ✔️ | ✔️ |
Supported platforms
| Architecture | Android | iOS | Windows | macOS | linux |
|---|---|---|---|---|---|
| x64 | ✔️ | ✔️ | ✔️ | ✔️ | |
| x86 | ✔️ | ✔️ | |||
| arm64 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| arm32 | ✔️ | ✔️ | |||
| riscv64 | ✔️ |
Supported programming languages
| 1. C++ | 2. C | 3. Python | 4. JavaScript |
|---|---|---|---|
| ✔️ | ✔️ | ✔️ | ✔️ |
| 5. Go | 6. C# | 7. Kotlin | 8. Swift |
|---|---|---|---|
| ✔️ | ✔️ | ✔️ | ✔️ |
It also supports WebAssembly.
Introduction
This repository supports running the following functions locally
- Streaming speech-to-text (i.e., real-time speech recognition)
- Text to speech (e.g., vits models from piper)
- VAD (e.g., silero-vad)
on the following platforms and operating systems:
- x86,
x86_64, 32-bit ARM, 64-bit ARM (arm64, aarch64), RISC-V (riscv64) - Linux, macOS, Windows, openKylin
- Android, WearOS
- iOS
- NodeJS
- WebAssembly
- Raspberry Pi
- RV1126
- LicheePi4A
- VisionFive 2
- 旭日X3派
- etc
with the following APIs
- C++, C, Python, Go,
C# - Kotlin
- JavaScript
- Swift
We support all platforms that ncnn supports.
Everything can be compiled from source with static link. The generated executable depends only on system libraries.
HINT: It does not depend on PyTorch or any other inference frameworks other than ncnn.
Please see the documentation https://k2-fsa.github.io/sherpa/ncnn/index.html for installation and usages, e.g.,
- How to build an Android app
- How to download and use pre-trained models
We provide a few YouTube videos for demonstration about real-time speech recognition
with sherpa-ncnn using a microphone:
-
Multilingual (Chinese + English) with endpointing Python demo : https://www.bilibili.com/video/BV1eK411y788/
-
Android demos
-
Multilingual (Chinese + English) Android demo 1: https://www.bilibili.com/video/BV1Ge411A7XS
-
Multilingual (Chinese + English) Android demo 2: https://www.bilibili.com/video/BV1eK411y788/
-
Chinese (with background noise)Android demo : https://www.bilibili.com/video/BV1GR4y167fx -
ChineseAndroid demo : https://www.bilibili.com/video/BV1744y1Z76H -
Chinese poem with background musicAndroid demo : https://www.bilibili.com/video/BV1vR4y1k7eo
Links for pre-built Android APKs
| Description | URL |
|---|---|
| Streaming speech recognition | Address |
Links for pre-trained models
https://github.com/k2-fsa/sherpa-ncnn/releases/tag/models
Useful links
- Documentation: https://k2-fsa.github.io/sherpa/ncnn/
- Bilibili 演示视频: https://search.bilibili.com/all?keyword=%E6%96%B0%E4%B8%80%E4%BB%A3Kaldi
How to reach us
Please see https://k2-fsa.github.io/sherpa/social-groups.html for 新一代 Kaldi 微信交流群 and QQ 交流群.
See also
Similar Projects
Discover other similar projects and AI models.
Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
SAVA Semantic acoustic voice activity: streaming speech and end-of-turn detection in one model with an open license. --- TL;DR SAVA returns two probabilities for a live audio stream: speech → whether a frame holds speech turn → whether the speaker's...
FireRedVAD: A SOTA Industrial-Grade Voice Activity Detection & Audio Event Detection Paper(https://huggingface.co/papers/2603.10420) Code(https://github.com/FireRedTeam/FireRedVAD) HuggingFace(https://huggingface.co/FireRedTeam/FireRedVAD) ModelScop...
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.
📚 C/C++ 技术面试基础知识总结,包括语言、程序库、数据结构、算法、系统、网络、链接装载库等知识及面试经验、招聘、内推等信息。This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.