n4ze3m/tiny-voca
SMALL ENGLISH TTS MODEL 4.5M PARAMETERS
Text-to-speech model with 4.5M parameters and two voices (male/female). Runs on CPU and in browser via ONNX, weighs 18 MB.
// KEY FEATURES
- 4.5M parameters, 18 MB with waveform generator
- ~70x real-time on 4 CPU threads
- Two voices F2/M2, English 24 kHz
- PyTorch, ONNX Runtime and ONNX Runtime Web
// DEEP DIVE: HOW IT WORKS
The model consists of a phonemizer and waveform generator trained from scratch on English data. Inference runs sentence by sentence: text is split by punctuation, empty segments are skipped, audio is concatenated into a final WAV without clipping (peak ≤ 0.99).
Unlike large TTS (Piper, Coqui), tiny-voca is deliberately minimal: 4.5M parameters vs hundreds of millions, fixed F2/M2 voices without cloning, English only. The entire artifact — 18 MB — includes the vocoder. ONNX export enables browser execution via ONNX Runtime Web without a server; there is a Rust port and an ESP32-S3 build.
Limitations: English only, two voices, F2 sounds younger than intended, foreign names often misread, no streaming. Training cost $9.56 on one RTX 4090 (7.7 hrs). Requires Python 3.10+, for ONNX — onnxruntime or onnxruntime-web.
// USE CASES
Best for: Developers embedding TTS into apps on CPU/browser
- Embed offline voice in desktop apps without GPU
- Run TTS directly in user browser via WebAssembly
- Train custom voices using project recipe and dataset
// QUICK START
git clone https://github.com/n4ze3m/tiny-voca.git
cd tiny-voca
pip install -e ".[own]"
hf download n4ze3m/tiny-voca --local-dir weights
export DIZIONE_DATA=weights/phonemizerCommands are taken from the repository README — check the current version on GitHub before running.
New repositories every 30 minutes
REDDYX AI scans GitHub 24/7 and ships the best AI/ML/Web3 projects to Telegram.
Join on Telegram