RapidAI/RapidSpeech-wasm
0
RapidSpeech.cpp — Browser Demo
Three-tab WebAssembly demo for RapidSpeech.cpp:
- ASR Offline — upload a WAV (or record one) → optional neural VAD → transcript with timestamps.
- ASR Online — live mic → neural VAD → streaming transcripts, with optional two-pass (CTC → LLM rescore).
- TTS Offline — text → speech via OmniVoice / OpenVoice2 (with voice-cloning).
Everything runs locally in your browser via WebAssembly + WebGPU + pthreads. After the WASM module loads, audio and model bytes never leave the page.
Why Docker SDK?
The demo needs cross-origin isolation (COOP+COEP) so SharedArrayBuffer and pthreads are available. HuggingFace's static SDK does not reliably set those headers, so this Space uses the Docker SDK with a tiny Python server (serve.py) that emits the right headers explicitly.
Models
Pick any GGUF from RapidAI/RapidSpeech and paste the resolve URL into the demo. Recommended starters:
- ASR:
funasr-nano-q4_k_m.gguf(~600 MB) - VAD:
silero-vad-v6.gguf(~2 MB) - TTS:
omnivoice-q4_k_m.gguforopenvoice2-base-en.gguf
Browser requirements
- Chromium 113+ for WebGPU (Chrome / Edge / Opera). Firefox / Safari fall back to CPU.
- Mic input requires HTTPS — HuggingFace Spaces already serves over HTTPS.
Source
Full project, native C++ CLI, Python / Node bindings, and conversion scripts: github.com/RapidAI/RapidSpeech.cpp
