n4ze3m/tiny-voca

★ 878⑂ 105

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

Repository n4ze3m/tiny-voca · default branch main · size 264 KB · watchers 5 · source: GitHub REST API and repository README

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.

Demo · Weights · Dataset

Features

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

Community

Built by other people on top of tiny-voca.

Languages and voices:

Ports and apps: Same idea, other sounds: Write-ups: Made something? Open an issue and I will add it.

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.

Cost breakdown

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}
}

GitHub Stars & Activity

878Stars
105Forks
2Open issues
PythonLanguage

GitHub Popularity

GitHub stars878
Forks105
Open issues2
Primary languagePython
LicenseApache-2.0
Stars gained today0
Created2026-11-14
Last pushed2026-11-23

Trending History

Weekly boardrank #94 · ▲ 0 stars

Related AI Projects

1

mvanhorn / last30days-skill

Python★ 73,326⑂ 6,477▲ 790 stars
→
2

jingyaogong / minimind

Python★ 69,370⑂ 9,058▲ 828 stars
→
3

HKUDS / CLI-Anything

Python★ 63,464⑂ 5,767▲ 783 stars
→
4

wshobson / agents

Python★ 42,840⑂ 4,534▲ 48 stars
→
5

agentscope-ai / agentscope

Python★ 36,554⑂ 3,910▲ 78 stars
→
6

Tracer-Cloud / opensre

Python★ 14,743⑂ 1,986▲ 438 stars
→
7

zhouxiaoka / autoclip

Python★ 14,301⑂ 2,202▲ 908 stars
→
8

SWE-agent / mini-swe-agent

Python★ 10,007⑂ 1,362▲ 43 stars
→

More AI Rankings