@@ -14,45 +14,78 @@ English | [简体中文](./README-CN.md)
1414
1515# RapidSpeech.cpp 🎙️
1616
17- Run local ASR and TTS from one GGUF-powered C++ runtime.
17+ Python-friendly local ASR and TTS, powered by a native C++ GGUF runtime.
1818
19- ** RapidSpeech.cpp** is a pure C/C++ speech inference engine for on-device
20- speech recognition, text-to-speech, VAD, speaker embedding, and voice cloning.
21- It uses ** ggml** backends and a unified ** GGUF** model format, so deployment is
22- one native runtime plus one model file .
19+ ** RapidSpeech.cpp** gives Python developers a simple API for local speech
20+ recognition, text-to-speech, VAD, speaker embedding, and voice cloning. Under
21+ the hood it uses a pure C/C++ engine, ** ggml** backends, and a unified ** GGUF**
22+ model format, so you get native performance without running a speech server .
2323
2424------
2525
26- ## Try It In 60 Seconds
26+ ## Python In 60 Seconds
27+
28+ ### Install
29+
30+ ``` bash
31+ pip install rapidspeech
32+ ```
33+
34+ GPU wheels:
35+
36+ ``` bash
37+ pip install rapidspeech-metal # macOS / Apple Silicon
38+ pip install rapidspeech-cuda # Linux / NVIDIA
39+ ```
2740
2841### Text to speech
2942
3043``` bash
31- ./build/rs-tts-offline \
32- -m /path/to/omnivoice-f16.gguf \
33- -t " Hello, welcome to RapidSpeech." \
34- --lang English \
35- -o output.wav
44+ python python-api-examples/tts/tts-offline.py \
45+ --model /path/to/omnivoice-f16.gguf \
46+ --text " Hello, welcome to RapidSpeech." \
47+ --output output.wav
3648```
3749
3850### Speech to text
3951
4052``` bash
41- ./build/rs-asr-offline \
42- -m /path/to/funasr-nano-fp16.gguf \
43- -w /path/to/audio.wav \
44- --gpu true
53+ python python-api-examples/asr/asr-offline.py \
54+ --model /path/to/funasr-nano-fp16.gguf \
55+ --audio /path/to/audio.wav
56+ ```
57+
58+ ### Python API
59+
60+ ``` python
61+ import rapidspeech
62+
63+ tts = rapidspeech.tts_synthesizer(" /path/to/omnivoice-f16.gguf" )
64+ tts.set_params(instruct = " male, young adult" , language = " English" , seed = 42 )
65+ pcm = tts.synthesize(" Hello from a native speech engine." )
66+ sample_rate = tts.get_sample_rate()
67+ ```
68+
69+ ``` python
70+ import rapidspeech
71+
72+ asr = rapidspeech.asr_offline(" /path/to/funasr-nano-fp16.gguf" )
73+ sample_rate = asr.get_model_meta()[" audio_sample_rate" ]
74+ pcm = ... # 1-D float32 mono PCM at sample_rate
75+ asr.push_audio(pcm)
76+ asr.process()
77+ print (asr.get_text())
4578```
4679
4780------
4881
4982## Why RapidSpeech.cpp
5083
84+ - ** Python API, native core** : write Python, run a C++/ggml engine underneath.
5185- ** One model format** : ASR, TTS, VAD, and speaker models use GGUF.
52- - ** One native runtime** : pure C/C++, no Python runtime required in production.
53- - ** One edge-first backend stack** : CPU, Metal, CUDA, Vulkan, CANN, OpenCL, and WebGPU.
54- - ** Built for speech** : VAD segmentation, streaming buffers, voice cloning,
55- quantization, and Apple Metal DAC acceleration.
86+ - ** NumPy in, NumPy out** : ASR takes float32 PCM; TTS returns float32 PCM.
87+ - ** Local by default** : no cloud API, no speech server, no Python model stack.
88+ - ** Edge-first backends** : CPU, Metal, CUDA, Vulkan, CANN, OpenCL, and WebGPU.
5689
5790------
5891
@@ -89,15 +122,15 @@ CosyVoice3, Qwen3-ASR, Qwen3-TTS.
89122
90123## Documentation
91124
125+ - [ Python examples] ( python-api-examples/README.md )
92126- [ Technical Notes] ( docs/TECHNICAL.md ) : architecture, design tradeoffs, backends,
93127 model conversion, and binding surfaces.
94- - [ Python examples] ( python-api-examples/README.md )
95128- [ Browser / WASM examples] ( wasm-examples/README.md )
96129- [ Node.js example] ( node-api-example/README.md )
97130
98131------
99132
100- ## 🛠️ Quick Start
133+ ## Native C++ CLI
101134
102135### Download Models
103136
@@ -166,12 +199,8 @@ Build artifacts are located in the `build/` directory:
166199
167200### Python
168201
169- ``` bash
170- pip install rapidspeech
171- ```
172-
173- Detailed CLI flags, Python APIs, binding surfaces, and model conversion recipes
174- live in [ Technical Notes] ( docs/TECHNICAL.md ) .
202+ See [ Python examples] ( python-api-examples/README.md ) for offline ASR, streaming
203+ ASR, offline TTS, streaming TTS, VAD, and voice cloning.
175204
176205------
177206
@@ -188,3 +217,6 @@ If you are interested in the following areas, we welcome your PRs or participati
1882171 . [ Fun-ASR] ( https://github.com/FunAudioLLM/Fun-ASR )
1892182 . [ llama.cpp] ( https://github.com/ggml-org/llama.cpp )
1902193 . [ ggml] ( https://github.com/ggml-org/ggml )
220+ 4 . [ cppjieba] ( https://github.com/yanyiwu/cppjieba ) — Chinese word segmentation
221+ 5 . [ WeText] ( https://github.com/wenet-e2e/wetext ) — text normalization (ITN/TN)
222+ 6 . [ miniaudio] ( https://github.com/mackron/miniaudio ) — single-file audio I/O
0 commit comments