Run tiny-voca: A 4.5M-Parameter English Text-to-Speech Model
Run n4ze3m's Apache-2.0 TTS model with PyTorch or ONNX, pick one of two voices, and tune speed and pitch. Includes limits from the card.
The code in this post comes from the model's docs and hasn't been run in our CI yet. If something breaks, let us know.
tiny-voca is a small English text-to-speech model with two voices, F2 (female) and M2 (male). The card says the complete model, including the waveform generator, has 4.5M parameters and was trained from scratch on about 18 hours of synthetic speech. It runs about 70x faster than real time on four CPU threads. The weights are Apache-2.0.
Key specs
From the model card:
| Item | Value |
|---|---|
| Parameters | 4,537,291 |
| Voices | F2, M2 (American English) |
| Output | 24 kHz mono |
| Input | Text, converted to phonemes with dizione |
| Files | tiny-voca.pt (18.2 MB, float32), onnx/model.onnx (21.4 MB, float32, opset 17) |
| Training | 16,018 clips (17.6 hours), 104,737 steps, one RTX 4090 for 7.7 hours |
The waveform comes from a source-filter synthesizer, not a neural vocoder. The training audio is synthetic: both voices were created with Qwen3-TTS VoiceDesign.
Install
pip install git+https://github.com/n4ze3m/dizione git+https://github.com/n4ze3m/tiny-vocahf download n4ze3m/tiny-voca --local-dir tiny-vocaexport DIZIONE_DATA=tiny-voca/phonemizerRun it
python -m tiny_voca.infer \ --checkpoint tiny-voca/tiny-voca.pt \ --voice F2 \ --text "Hello! This is tiny voca." \ --output hello.wavOptions from the card:
| 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 | Added to log F0; 0.058 is about one semitone |
--pitch-range |
1.0 | Scales pitch movement around the utterance mean |
Text of any length works. The command reads it one sentence at a time and joins the audio. A text that ends without a mark gets a full stop.
Use case: narrate a text file in both voices
The card documents --text-file, --voice and --output, so a small wrapper can render the same script in each voice. Run it from the folder that contains tiny-voca/, with DIZIONE_DATA set as above.
import subprocessimport sys
text_file = sys.argv[1] # e.g. script.txt
for voice in ("F2", "M2"): subprocess.run( [ sys.executable, "-m", "tiny_voca.infer", "--checkpoint", "tiny-voca/tiny-voca.pt", "--voice", voice, "--text-file", text_file, "--output", f"narration-{voice}.wav", ], check=True, ) print(f"wrote narration-{voice}.wav")Use case: tune speed and pitch
The card notes that the speech is slightly faster than the training recordings at the default speed, and that F2 sounds younger than intended. The --speed and --pitch-shift options are the knobs to try. Treat the values below as starting points to listen to, not recommendations from the card.
import subprocessimport sys
for speed in (0.9, 1.0): out = f"hello-speed-{speed}.wav" subprocess.run( [ sys.executable, "-m", "tiny_voca.infer", "--checkpoint", "tiny-voca/tiny-voca.pt", "--voice", "F2", "--speed", str(speed), "--pitch-shift", "-0.058", "--text", "Hello! This is tiny voca.", "--output", out, ], check=True, ) print("wrote", out)Use case: ONNX without PyTorch
The ONNX graph takes phoneme ids and stress values and returns the waveform. Text is converted to ids outside the graph with dizione. This is the example from the card:
import numpy as npimport onnxruntime as ortimport soundfile as sfimport dizione # needs DIZIONE_DATA=tiny-voca/phonemizer
phones = dizione.phonemize("Hello! This is tiny voca.")one = lambda value: np.array([value], dtype=np.float32)
session = ort.InferenceSession("tiny-voca/onnx/model.onnx")audio, durations = session.run(None, { "tokens": np.array([phones.ids], dtype=np.int64), "stress": np.array([phones.stress], dtype=np.int64), "voice": np.array([0], dtype=np.int64), # 0 = F2, 1 = M2 "speed": one(1.0), "pitch_shift": one(0.0), "pitch_range": one(1.0),})audio = audio[0]audio = audio * min(1.0, 0.99 / np.abs(audio).max()) # the model can peak above 1.0sf.write("hello.wav", audio, 24000)Inputs: tokens and stress are int64 [1, N]; voice is int64 [1]; speed, pitch_shift and pitch_range are float32 [1]. Outputs are audio (float32, [1, samples], 24 kHz) and durations (int64, [1, N], in frames of 256 samples). The card says the same file runs in onnxruntime-web (WebAssembly).
Gotchas
- One utterance per ONNX call: up to 512 tokens and 32 seconds. Split longer text into sentences. The card says
tiny_voca.infer.speak_textdoes this in Python. - End every utterance with a mark such as a full stop. Without one the last word breaks off.
- Clipping: the audio can peak a little above 1.0 (about one sentence in twenty). Scale it down before saving 16-bit samples, as in the example.
- Pronunciation: foreign names and unusual spellings are often mispronounced. Numbers, abbreviations and homographs depend on the phonemizer.
- Limits: English only, two fixed voices, no voice cloning, no streaming. The same text is always read the same way. The voice can sound slightly synthetic.
- Phonemizer data: the files in
phonemizer/are derived from the CMU Pronouncing Dictionary and other sources, with their own licenses inphonemizer/LICENSE.cmudictandphonemizer/LICENSE.homograph-data.
How good is it?
On a small check, the card reports word error rate of 0.6% on validation (8 clips) and 0.9% on test (8 clips), matching the recordings themselves, using Whisper small.en to transcribe. The card itself calls these “a sanity check, not a benchmark” and says no formal listening test has been run.
The card also gives a snapshot of the Open TTS Leaderboard (16 November 2026, English, without voice cloning): M2 ranks 8th by average WER (0.733) and F2 ranks 13th (0.773) among 50 ranked models.
When to pick it
Pick tiny-voca when you need English speech on a CPU, a phone or in a browser, you are happy with two fixed voices, and file size matters. The card positions it for exactly these settings.
Skip it if you need voice cloning, other languages, streaming output, or expressive speech that varies between runs. Check the card’s own caveat that it cannot be more natural than the model that generated its training data.
Related
Run Fish Audio Drama 3 for Multi-Speaker Speech and Voice Cloning
Fish Audio Drama 3 is a 35B MoE text-to-speech model with 3B active parameters, up to 16 speaker tags, voice cloning and edit-by-continuation.
fishaudio/drama-3
Run EMA Lightning: 8.6M-Parameter Turkish Text-to-Speech
EMA Lightning is a 34 MB, Apache-2.0 Turkish TTS model with streaming output. Install it, generate files, stream audio and serve many callers.
canberkkkkkk/ema-lightning
Run Kokoro-82M: Apache-Licensed Text-to-Speech in a Few Lines
Kokoro-82M is an 82M-parameter open-weight TTS model. How to install it, generate speech, and use it for narration, pronunciation fixes, and captions.
hexgrad/Kokoro-82M