Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

n4ze3m/tiny-voca

Machine Learning

A 4.5M-parameter English text-to-speech model with two voices that runs on CPU or in the browser.

230
26
Python
Apache-2.0
1 day old

Project overview

tiny-voca is a small English text-to-speech model trained from scratch. It has 4,537,291 parameters (about 18 MB including the waveform generator) and produces 24 kHz American English audio in two fixed voices: F2 (female) and M2 (male). The design goal is to keep the model small and fast enough to run without a GPU, either through PyTorch, ONNX Runtime, or ONNX Runtime Web in a browser.

Code, weights, training recipe, and dataset are all published. The released weights come with a reproducible training pipeline, and the project documents its own model and data in docs/model.md. It suits people who need lightweight, offline English TTS, or who want a tiny end-to-end speech model to study, fine-tune, or port.

Quick start

Prerequisites: Python and git; the install step uses the hf CLI for downloading weights.

  1. Install the package and fetch the weights:
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
  1. Synthesize a sentence:
python -m tiny_voca.infer \
  --checkpoint weights/tiny-voca.pt \
  --voice F2 \
  --text "Hello! This is tiny voca." \
  --output hello.wav

This writes hello.wav. Adjust speaking rate, pitch shift, and pitch range with --speed, --pitch-shift, and --pitch-range. For browser use, try the web demo, whose source lives in the web/ directory and can be run locally with npx wrangler dev.

Model and training

The training pipeline covers data preparation, annotation, GAN-based training, and evaluation as separate commands (tiny_voca.prepare, annotate, train, evaluate). The released weights took 7.7 hours on one RTX 4090. To export ONNX, run:

python -m tiny_voca.export --checkpoint weights/tiny-voca.pt --output tiny-voca.onnx

A ready ONNX file is already provided in the weights repository, and its model card shows how to call it.

Constraints

  • English only, with two fixed voices; there is no voice cloning.
  • The model reads one sentence at a time, so long text must be split first.
  • Foreign names and unusual spellings are often mispronounced.
  • Streaming is not supported yet.
  • Code and weights are Apache-2.0; the dataset is CC BY 4.0.

HotRepo's take

The project appeared on HotRepo's new Python list for 2026-11-15 with 105 stars gained and 12 forks gained during its first tracked growth window, which started shortly after repository creation on 2026-11-14. It has not been recorded on the all-language daily rank, so its standing here rests on that single new-project observation rather than a longer trend. What distinguishes it technically is the combination of a sub-5M-parameter model, a complete from-scratch training recipe, and ONNX/browser deployment in one package, which is a narrower and more verifiable scope than most small TTS projects offer.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

You might also like

  1. pnnbao97/VieNeu-TTSVietnamese text-to-speech with instant voice cloning that runs on CPU or GPU for real-time speech.Python3,280
  2. OpenBMB/VoxCPMA 2B tokenizer-free TTS model for 30-language speech synthesis, voice design, and voice cloning.Python42,008
  3. hehehai/AudioSmithA local Mac studio for text-to-speech, voice cloning, audiobooks, dubbing and transcription, with all models running on-device.Go107
  4. NVIDIA-NeMo/SpeechA PyTorch framework for building, fine-tuning, and running speech recognition, synthesis, and speech-LLM models.Python18,655
  5. moonshine-ai/moonshineBuild low-latency, on-device voice interfaces with streaming speech-to-text, intent recognition, and text-to-speech.C++11,335