Skip to main content

No project description provided

Project description

RapidSpeech Logo

English | 简体中文

Open in Colab

RapidSpeech.cpp 🎙️

Python-friendly local ASR and TTS, powered by a native C++ GGUF runtime.

RapidSpeech.cpp gives Python developers a simple API for local speech recognition, text-to-speech, VAD, speaker embedding, and voice cloning. Under the hood it uses a pure C/C++ engine, ggml backends, and a unified GGUF model format, so you get native performance without running a speech server.


Python In 60 Seconds

Install

pip install rapidspeech

GPU wheels:

pip install rapidspeech-metal   # macOS / Apple Silicon
pip install rapidspeech-cuda    # Linux / NVIDIA

Text to speech

python python-api-examples/tts/tts-offline.py \
  --model /path/to/omnivoice-f16.gguf \
  --text "Hello, welcome to RapidSpeech." \
  --output output.wav

Speech to text

python python-api-examples/asr/asr-offline.py \
  --model /path/to/funasr-nano-fp16.gguf \
  --audio /path/to/audio.wav

Python API

import rapidspeech

tts = rapidspeech.tts_synthesizer("/path/to/omnivoice-f16.gguf")
tts.set_params(instruct="male, young adult", language="English", seed=42)
pcm = tts.synthesize("Hello from a native speech engine.")
sample_rate = tts.get_sample_rate()
import rapidspeech

asr = rapidspeech.asr_offline("/path/to/funasr-nano-fp16.gguf")
sample_rate = asr.get_model_meta()["audio_sample_rate"]
pcm = ...  # 1-D float32 mono PCM at sample_rate
asr.push_audio(pcm)
asr.process()
print(asr.get_text())

Why RapidSpeech.cpp

  • Python API, native core: write Python, run a C++/ggml engine underneath.
  • One model format: ASR, TTS, VAD, and speaker models use GGUF.
  • NumPy in, NumPy out: ASR takes float32 PCM; TTS returns float32 PCM.
  • Local by default: no cloud API, no speech server, no Python model stack.
  • Edge-first backends: CPU, Metal, CUDA, Vulkan, CANN, OpenCL, and WebGPU.

Performance Snapshot

Test environment: Apple M1 Pro, funasr-nano-fp16.gguf, 15s audio.

Configuration RTF Wall Time Notes
CPU -t 4 0.465 12.4s CPU-only inference
GPU -t 4 0.170 5.2s Metal acceleration
GPU -t 4 Q4_K 0.756 - Quantized model: GPU dequant overhead
CPU -t 4 Q4_K 0.530 - Quantized model CPU inference, 596 MB (3.3x compression)

RTF is processing time divided by audio duration. Lower is faster; RTF < 1 is faster than real time.


Supported Today

Task Models Status
ASR SenseVoice-small, FunASR-nano Stable
VAD Silero VAD, FireRedVAD Stable
TTS OmniVoice, OpenVoice2, Kokoro Active
Speaker CAMPPlus Stable

In Progress

CosyVoice3, Qwen3-ASR, Qwen3-TTS.


Documentation


Native C++ CLI

Download Models

Models are available on:

Build from Source

git clone https://github.com/RapidAI/RapidSpeech.cpp
cd RapidSpeech.cpp
git submodule sync && git submodule update --init --recursive
cmake -B build
cmake --build build --config Release

Build artifacts are located in the build/ directory:

  • rs-asr-offline — Offline ASR command-line tool
  • rs-asr-vad-online — VAD-segmented quasi-streaming ASR command-line tool
  • rs-tts-offline — Offline TTS command-line tool
  • rs-quantize — Model quantization tool

Core Commands

Offline ASR

./build/rs-asr-offline \
  -m /path/to/funasr-nano-fp16.gguf \
  -w /path/to/audio.wav \
  -t 4 \
  --gpu true

VAD-segmented ASR

./build/rs-asr-offline \
  -m /path/to/funasr-nano-fp16.gguf \
  -v /path/to/silero_vad_v6.gguf \
  -w /path/to/audio.wav \
  -t 4 \
  --vad-threshold 0.5 \
  --silence-ms 600

Text to speech

./build/rs-tts-offline \
  -m /path/to/omnivoice-f16.gguf \
  -t "Hello, welcome to RapidSpeech!" \
  --instruct "male, young adult, moderate pitch" \
  --lang English \
  --n-steps 32 \
  -o output.wav

Quantization

./build/rs-quantize /path/to/input-f16.gguf /path/to/output-q4_k.gguf q4_k

Python

See Python examples for offline ASR, streaming ASR, offline TTS, streaming TTS, VAD, and voice cloning.


🤝 Contributing

If you are interested in the following areas, we welcome your PRs or participation in discussions:

  • Adapting more models to the framework.
  • Refining and optimizing the project architecture.
  • Improving inference performance.

Acknowledgements

  1. Fun-ASR
  2. llama.cpp
  3. ggml
  4. cppjieba — Chinese word segmentation
  5. WeText — text normalization (ITN/TN)
  6. miniaudio — single-file audio I/O

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rapidspeech_cuda-1.2.0-cp313-cp313-win_amd64.whl (10.9 MB view details)

Uploaded CPython 3.13Windows x86-64

rapidspeech_cuda-1.2.0-cp313-cp313-win32.whl (10.9 MB view details)

Uploaded CPython 3.13Windows x86

rapidspeech_cuda-1.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (9.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

rapidspeech_cuda-1.2.0-cp312-cp312-win_amd64.whl (10.9 MB view details)

Uploaded CPython 3.12Windows x86-64

rapidspeech_cuda-1.2.0-cp312-cp312-win32.whl (10.9 MB view details)

Uploaded CPython 3.12Windows x86

rapidspeech_cuda-1.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (9.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

rapidspeech_cuda-1.2.0-cp311-cp311-win_amd64.whl (10.9 MB view details)

Uploaded CPython 3.11Windows x86-64

rapidspeech_cuda-1.2.0-cp311-cp311-win32.whl (10.9 MB view details)

Uploaded CPython 3.11Windows x86

rapidspeech_cuda-1.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (9.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

rapidspeech_cuda-1.2.0-cp310-cp310-win_amd64.whl (10.9 MB view details)

Uploaded CPython 3.10Windows x86-64

rapidspeech_cuda-1.2.0-cp310-cp310-win32.whl (10.9 MB view details)

Uploaded CPython 3.10Windows x86

rapidspeech_cuda-1.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (9.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

rapidspeech_cuda-1.2.0-cp39-cp39-win_amd64.whl (10.9 MB view details)

Uploaded CPython 3.9Windows x86-64

rapidspeech_cuda-1.2.0-cp39-cp39-win32.whl (10.9 MB view details)

Uploaded CPython 3.9Windows x86

rapidspeech_cuda-1.2.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (9.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file rapidspeech_cuda-1.2.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 da895678386e5a4cce09431431d8dc9c2501d9faafb0ec4e5ba904868e24b1be
MD5 75781c78c11f15528fb5f5d20a92e811
BLAKE2b-256 7ed06f043cd711623a69fa15331d61eeb3cc0486c63d2d101c2eaff7c8737c6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp313-cp313-win_amd64.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp313-cp313-win32.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 07289b79bdf3e753b0b8b5c483cf125e33e0cfb711e5e335bcacbfcbb6aa3594
MD5 00b5bad8073b37a122929b199283b61c
BLAKE2b-256 f53f8487cfa1eb5ae8b2f1a9f77c14767274a13a505c9fa1eaa56cd517b5421e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp313-cp313-win32.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 461896e93cfd293f3184572dd938e450b77a1a8ef8e64cfc02886c7192d6c8b7
MD5 9814111f812f6c7f95bae72e1826419b
BLAKE2b-256 35a91b700267a2aa555991a8ec7ec96cb4afc74cfe77e7dcb1af8552ba9d53ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9e181bcfd0b69e2ead7995c80594e36388e73a077f8b6a22bbee0870582501d2
MD5 33736217bb8da406923865113efba08f
BLAKE2b-256 5ef632915781fe1266b7be8c0a5758bf38fd39dbe48a7059c0835caf90bbed30

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp312-cp312-win_amd64.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp312-cp312-win32.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 0e6e7068131b60354f590862cfda78623d51694030ef1327f4f724a37bcbeb4c
MD5 9df2ecf1ebda1628b46d3c3dd3a9647d
BLAKE2b-256 5eab5acff7b1964cfcb65b6cfe64c7a516ba7bb319a2a232a29739c8e664abeb

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp312-cp312-win32.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 0a17209a7f31edc93e0366f60cc2ed333bc191a3de0727253f6a308a3d93b747
MD5 cd27c58794edf42f3e261fbe2c22ea54
BLAKE2b-256 c2eb5c196758bce791e5acc85242d2d083fd6805e6d4ef1a89cbc1e6bed71ef4

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 042cbc94c0768d8b8d5fcbbecf9439474ad49c8b70ccfe70a82aa07f9c182115
MD5 187fecddd15e0d9f131e004763cf0736
BLAKE2b-256 a3b002033b93fe56e3b3cd086d2ade657272e894e4ad6ccf2eb1bc989040d252

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp311-cp311-win_amd64.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp311-cp311-win32.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 0297eef60b51066618a232afee5cb692b7d4d017e10df2a2c63f0fcec3b6e9fc
MD5 b8ed316305773e18697d6f5ab3e5ceca
BLAKE2b-256 f4c5bf63b91063cacd13ad19d2d01e0a9fc9628ad309e58d06634f8fdc59320f

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp311-cp311-win32.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 cf50b8daaaa70ea73b12fee7d760f19fc72083c57de3d24ae2ac2d9752edf16f
MD5 eeef32897e56920f41be52f51375c82a
BLAKE2b-256 9e88a386a50e4b2f7a2bbb7d432558967823d2cb4f7bc87200a06a0dbe038776

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f5e0d090a472e9e8228339e224d953aece1b7746b75908680bef68c9aecd1cd6
MD5 dfceb1e8b59f7fa48e9521f72f4dec02
BLAKE2b-256 7ad21da712872a6668b3247213a3f82e2434ea2cadaaff01864024d86aa8059f

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp310-cp310-win_amd64.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp310-cp310-win32.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 9c1a3a3230508defa12d72be4be717e86c27f18984c06fa9cb84d789ef0f591c
MD5 c8bb54501719294346f2a2d1731e2438
BLAKE2b-256 a15d83224ac23fdd203e541a99aff931d9f7a084e089e0c9b964d1c43ab0694f

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp310-cp310-win32.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 e0cc32db917c7728546c3aa04a6758e4ef76fa80ff789468459e3ffdfaa83dce
MD5 a626d29399f883a378a52e00293add02
BLAKE2b-256 fd7e70a1a3cc5fe2a0339115c540adb281e6a79a5958350b414550644365ab8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2f97fb30a60b7b6fd3dd118ecfe28887af0f5a3c51c4981bde2aac5e65a3dee8
MD5 184fc08d6acc5625d0e3de4394c08c1e
BLAKE2b-256 5743185e0a9ff27163bc3dc0826b15105ffc732c29fd5e050b42d54d640d642d

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp39-cp39-win_amd64.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp39-cp39-win32.whl.

File metadata

  • Download URL: rapidspeech_cuda-1.2.0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 da7b0a3436d4b040c42b6f42834fb20dda24fb6e73b21567c1572051a81c33ec
MD5 eb9e3ede2490ed425e152ff3d932952d
BLAKE2b-256 157466263187e9ca8f1a3d09630156b7a760ff7a2f566df882bf059c1dd0efbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp39-cp39-win32.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidspeech_cuda-1.2.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for rapidspeech_cuda-1.2.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 0a1445a66b6aa658d6260f0d4917280bdf0d6c21bbe9b8396e70359e868b1ae0
MD5 d4971ba574489684e2c9b1eaea0a3cc0
BLAKE2b-256 d4b9e7b91390e554c71e6992e99ebe66894533c9d9c9ad24e20aa5c2677661be

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech_cuda-1.2.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: pypi_publish.yml on RapidAI/RapidSpeech.cpp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page