n4ze3m/tiny-voca
A 4.5M-parameter two-voice English text-to-speech model, trained from scratch
About n4ze3m/tiny-voca
n4ze3m/tiny-voca is an open-source project on GitHub, mainly written in Python. A 4.5M-parameter two-voice English text-to-speech model, trained from scratch It currently holds 878 stars and 105 forks with 2 open issues, and was last pushed on 2026-11-23 (repository created 2026-11-14).
Project Overview
AI Homed tracks it on the Today's Trending board.
GitHub Repository Details
README
tiny-voca
tiny-voca is a small English text-to-speech model. It has two voices, 4.5M parameters, and runs on a CPU or in the browser.
Features
- Small: 4,537,291 parameters, 18 MB, waveform generator included.
- Fast: about 70x real time on four CPU threads.
- Two voices: F2 (female) and M2 (male), American English, 24 kHz.
- Runs anywhere: PyTorch, ONNX Runtime, and ONNX Runtime Web.
- Open: code, weights, training recipe and dataset. Trained from scratch.
Install
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/phonemizer
Usage
python -m tiny_voca.infer \
--checkpoint weights/tiny-voca.pt \
--voice F2 \
--text "Hello! This is tiny voca." \
--output hello.wav
| Option | Default | Meaning |
|---|---|---|
| --text-file | | Read the text from a file instead of --text |
| --voice | F2 | F2 or M2 |
| --speed | 1.0 | Speaking rate |
| --pitch-shift | 0 | Raise or lower the pitch |
| --pitch-range | 1.0 | More or less pitch movement |
Long text is fine. It is read one sentence at a time and the audio is joined.
A text that ends without a mark gets a full stop, so the last word does not
break off. A sentence with nothing to read, such as one in another script, is
skipped. The output never peaks above 0.99, so it does not clip as a 16-bit
WAV. In Python, tiny_voca.infer.speak_text does the same.
ONNX
python -m tiny_voca.export --checkpoint weights/tiny-voca.pt --output tiny-voca.onnx
--optimized writes a smaller graph with the same audio, up to float
rounding. In ONNX Runtime on a CPU it is about 10% faster on a 3-second
sentence and 25 to 40% faster on a 10-second one. It needs opset 16 or later.
A ready file is in the weights repository as onnx/model.onnx. The
model card shows how to call it.
Web demo
The demo runs the model in the browser. It
plays each sentence as soon as it is made, and keeps the whole clip in the
player. Its source is in web/.
cd web
bash fetch_assets.sh /path/to/dizione
npx wrangler dev
Plain JavaScript
An experiment in js/: the model and the phonemizer in plain scripts, with no
libraries. It reads one 8 MB file and runs in the browser, in Node and in Bun.
node js/say.mjs "Hello! This is tiny voca." --voice M2 --output hello.wav
See js/README.md.
Training
export TINY_VOCA_FRONTEND=own
python -m tiny_voca.prepare --inputs data/train-*.parquet --split train --output features
python -m tiny_voca.annotate --features features --output annotations
python -m tiny_voca.train --train annotations/train.jsonl --validation annotations/validation.jsonl \
--output runs/NAME --steps 104000 --gan-start 8000 --gan-ratio 0.7 --teacher-final 0
python -m tiny_voca.evaluate --checkpoint runs/NAME/inference.pt --annotations annotations --output eval/NAME
The released weights took 7.7 hours on one RTX 4090. More about the model and the data is in docs/model.md.
Tests
PYTHONPATH=src:tests python -m unittest discover -s tests
Limits
- English only. Two fixed voices. No voice cloning.
- The F2 voice sounds younger than intended. A more mature voice is planned.
- Foreign names and odd spellings are often read wrong.
- No streaming yet.
Community
Built by other people on top of tiny-voca.
Languages and voices:
- apptor-tiny-tts: German.
- apptor-tiny-tts-at: Austrian German, with an accent you can turn up or down and a browser demo.
- tiny-voca-de-en: German and English, with up to 32 voices in each.
- tiny-voca-it: Italian.
- vocina: Italian, with a browser demo.
- zerre-tts: Turkish.
- clarvia-tts-tiny: Turkish, ten voices, with its own phonemizer for numbers, dates and money.
- tiny-voca-uzbek-navoiy: Uzbek, one male voice, trained from scratch on 7.7 hours of Navoiy-generated speech.
- korean-tts: Korean, and Korean mixed with English.
- tiny-voca-ja-tsukuyomi-chan: Japanese, in Tsukuyomi-chan's voice, under that voice's own terms.
- tiny-voca-ja: Japanese, two voices, trained on synthetic speech only.
- tiny-voca-zh: Mandarin Chinese, two voices, trained on synthetic speech only.
- tiny-voca-zh: Chinese, with male (
M) and female (F) voices and a dedicated Chinese text front end. - slyszeglosy: Polish.
- tiny-voca-ru: Russian, with a browser demo.
- tiny-voca-gr: Modern Greek, a male and a female voice.
- mini-voz: Spanish, with a Castilian accent.
- tiny-voca-es: Spanish from Spain, with a browser demo.
- alpa-es: Rioplatense Spanish.
- tiny-voca-fr: French, with a browser demo.
- tiny-voca-ptbr: Brazilian Portuguese, with its own phonemizer.
- tiny-voca-ptbr-kokoro: Brazilian Portuguese, with Kokoro's Brazilian voices as the teacher.
- tiny-broca: Brazilian Portuguese, two voices, reads letters with no dictionary, with a browser demo.
- tiny-voca PT-PT: European Portuguese, two voices, trained from scratch on 22.8 hours of synthetic speech, with a rule-based phonemizer and a browser demo.
- tiny-voca Arabic: Modern Standard Arabic, trained on a CPU from the Arabic Speech Corpus.
- tiny-voca-ar: Modern Standard Arabic, an early version with a browser demo.
- tiny-voca-arabic: Modern Standard Arabic, trained from scratch, with a browser demo.
- tiny-voca-he: Hebrew, one male voice, with a browser demo.
- pitput: Hebrew, eight delivery styles and expression tags like laughs and sighs, for research use only.
- Browser Voice: Bengali, Gujarati, Hindi, Malayalam and Telugu in native script or Roman letters, with a browser demo and its code.
- tiny-swara: Bengali, two voices, trained from scratch on free Kaggle GPUs.
- tiny-voca-hindi: Hindi, one voice with eight speaking styles, and a C++ engine.
- tui-voice-mini-ml: Malayalam, an early preview.
- tiny-voca-sinhala: Sinhala, a male and a female voice, trained from scratch on free Kaggle GPUs, with a browser demo.
- tiny-urdu: Roman Urdu, with a browser demo.
- Kurdish Behdînî Voice: Kurdish Behdînî, 21 voices, with a browser demo.
- tiny-ava: Persian (Farsi), one female voice, trained from scratch on about 20 hours of synthetic speech, with a browser demo.
- tiny-voca Kiswahili: Swahili, runs offline on a low-end Android phone.
- tiny-voca-lg: Luganda, two voices, with a rule-based front end and a browser demo.
- SobbieTTS: English, an expressive voice.
- alpa: Sanskrit, fine-tuned from tiny-voca on a CPU.
- fiato: English, with sighs, exhales and gasps.
- llama.cpp: runs tiny-voca with
llama-tts, from GGUF files. - voca: a rewrite in Rust.
- tiny-voca-rust: another Rust port.
- audio.cpp: runs tiny-voca in C++ with ggml.
- voca-server: a server with an OpenAI-compatible API.
- tiny-voca-esp32s3: runs on an ESP32-S3 microcontroller.
- tiny-voca-ane: runs on the Apple Neural Engine with Core ML, with a Swift package.
- tiny-voca-dashboard: a local dashboard.
- tinyvoca: a Mac app.
- CopySpeech: reads your clipboard aloud, with tiny-voca as the default voice.
- Tiny Reader: a Firefox add-on that reads web pages and PDFs aloud.
- tiny-voca GUI: a simple local web interface.
- TinyVocaTTS: a one-click Windows interface that can also load the community voices.
- Tiny-Voca-Pinokio: a one-click launcher for Pinokio.
- tinygroove: a drum machine with no samples.
- Three small TTS models: how tiny-voca works, measured next to Kitten TTS and Tontaube on one CPU.
- tiny-voca review: what it does well, where it breaks and how to run it.
- AlphaSignal: a short summary of the model, the data and the limits.
Cost
The whole project cost $9.56 of GPU time on one rented RTX 4090. That is the dataset, the failed tries and the final training run.
Support
It cost less than a pizza to make. If you like it, you can buy me one: https://ko-fi.com/n4ze3m
License
Apache-2.0 for code and weights. CC BY 4.0 for the dataset.
Citation
@software{nazeem2026tinyvoca,
author = {Nazeem, Muhammed},
title = {tiny-voca: a 4.5M-parameter two-voice English text-to-speech model},
year = {2026},
url = {https://huggingface.co/n4ze3m/tiny-voca}
}