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-1.2.0-cp313-cp313-win_amd64.whl (10.9 MB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13Windows x86

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

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12Windows x86

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

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11Windows x86

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

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10Windows x86

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

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9Windows x86-64

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

Uploaded CPython 3.9Windows x86

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

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: rapidspeech-1.2.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rapidspeech-1.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2d10320123257d509619b15dbf949f6b0dd2d6e2c1b5be5ab94225e2b80b493b
MD5 4e60369b666f080f535426d05d191760
BLAKE2b-256 b52d106c607d984ddf52e28e22240daac5787ee203fd4ac03121ef97cf543b81

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-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-1.2.0-cp313-cp313-win32.whl.

File metadata

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

File hashes

Hashes for rapidspeech-1.2.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 bfc6885519436a028f08c4ed190f3bb7511ea332d480db4596144760ce0923fd
MD5 d3ec5a5ccc8d018d67be7479df64f25d
BLAKE2b-256 5cca86941eff1e76d1c7489e87b5335ecc097fd7b571839c10b797f500a751dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-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-1.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rapidspeech-1.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bbc049d90682a7e78df2d51c88df3f7c1b327e02d06bbc7064284573f03f7594
MD5 a2c87fbfafbcdbdaf307f6cfd983a092
BLAKE2b-256 87b231b8a9857099496c3c35031764f60e47c0e7d5e30b09a896e1dab5ba723a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-1.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_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-1.2.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: rapidspeech-1.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rapidspeech-1.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 37b104102b35571db9c36688fa54fd023dd11e39904cb53e5c3a2ce5a727fe94
MD5 14515b7f257e99d744145e3cd70a8c8d
BLAKE2b-256 7b379f3eee2b21b43f0aa54d9792c30424f908c6e805683d50235d1f4a64004b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-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-1.2.0-cp312-cp312-win32.whl.

File metadata

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

File hashes

Hashes for rapidspeech-1.2.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 c0f8ab8788fc8bd4d63a7f017dc0605ea8d39fdf7e242b6f4ff884b635963de0
MD5 1bdbe85e19fdcf27ec7866a43024c564
BLAKE2b-256 0bd30140c5986862acd74f1652139386857593be4bb9addf727f33056c6bf0df

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-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-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rapidspeech-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2a8c4dcc27f8c2933222b71ad0ebce709bab0bd69e1c36afe1cade312162802b
MD5 a759c504b72376865c33df7a33e1dd18
BLAKE2b-256 d043e187670f63bec2188327ae49d0c12c57d8aeeaa9ed387081a80b0dd095a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_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-1.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: rapidspeech-1.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rapidspeech-1.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6f4e36672e42a26cff1c8546137218a0070cb12ad99c536f11a790a4248784e9
MD5 637a8711cdc61fc6a18c8417e413fc37
BLAKE2b-256 518fe0012ebe6c281156ec5ee93fd2371fc50f57020f8c363e05a401548b68dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-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-1.2.0-cp311-cp311-win32.whl.

File metadata

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

File hashes

Hashes for rapidspeech-1.2.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 ded0debdb42a05721e5db26c46be8e2c3b7b275db2a1701daf2c657c3ad06afe
MD5 04298a7b34418772fdab2fff52872174
BLAKE2b-256 b31f200f80a03532af2450c23fc8f6e87e8a66b32101cb06216ecc95efb7c353

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-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-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rapidspeech-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9ad08d1f7f470d8a7ab9e0b54b08bb3144cc58c012176934a6b5d8200fd5190f
MD5 fa990ff7ce19ac59433807290d85dfaf
BLAKE2b-256 b92a901a01283fbb89dc2427e0531f6b58ac71680166bb0be98ab2a10192e8d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_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-1.2.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: rapidspeech-1.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 10.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rapidspeech-1.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f26aa343ab7316a994873934a3e6c74317fd1056dad352a522134a9ccffbed17
MD5 00dbc97e1fade6f5965f9c44ae45e6ea
BLAKE2b-256 c6f80c58a3397057bd069be74e1daaa23af7b9117769f1a5d76e1068472d5a81

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-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-1.2.0-cp310-cp310-win32.whl.

File metadata

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

File hashes

Hashes for rapidspeech-1.2.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 cb17e87f299af7579c63e4ce0b080be0527a6b59d7c28335487de8aa93b17f41
MD5 f670c1000d94934c214eb820f1be8c7b
BLAKE2b-256 829e6fa80717cc7e4eef18cf3096010c9623e42d3d743e7263affd5f8364fb2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-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-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rapidspeech-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d256694b95a3b214b77021a656ddca1671b151eb277d3763084ee67a2020abbf
MD5 27115ffa2f43bc367ae3eaf9b9be862e
BLAKE2b-256 3d68e547ea60063875911ea1ec428e37fe6a5bd529530b1a22ddd455327e6ae5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_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-1.2.0-cp39-cp39-win_amd64.whl.

File metadata

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

File hashes

Hashes for rapidspeech-1.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 25cfae266feadbc8f88f50e354425aef5ef70bb51383709eb829b5c767886bfc
MD5 9ffffc9f3ab9a388bfe1e3fbf5ca7f62
BLAKE2b-256 da8edc9939c5ca465f8f69362a1dda9614822644fbd48ab72d750e21a817d5fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-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-1.2.0-cp39-cp39-win32.whl.

File metadata

  • Download URL: rapidspeech-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-1.2.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 9cfaa5efd608e5f60dd58e9a914ce6dfb8d98753a70b7b2be0f807ddd372ee21
MD5 0ef83fd02c37a5d29ec7b5bf0a91dbe8
BLAKE2b-256 5609169db6a49108f8c147a363c7ea71ffa845d858e872698d3d82a0020068fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-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-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rapidspeech-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 15f6a7426b2c454afe4950260544fad110229fd1726d5016034e1e64e52247fa
MD5 0a1bd8ff994c51e0e01b4ef5c24b304c
BLAKE2b-256 e2b77c55e73b2af236eebd18ae75fa259a185b0bc8a28a6cbdda5ec26dbca517

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidspeech-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_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