tiny-voca Voice Tuner

tiny-voca is a 4.5M-parameter text-to-speech model with two stock voices, F2 and M2. Build your own voice for it here and save it as a file to use in your own pages and scripts. Everything runs in this page, from an 11 MB download, and the model speaks about 16× faster than real time on one WebAssembly (CPU) thread.

Once it has loaded, pick a preset and press Speak, then drag a slider: each release plays the text again in the new voice. Switch to Sing to hear the same voice sing lyrics to notes you write.

Presets

Voice embedding

Distance off the F2–M2 line: 0.00

Pitch and pace

Vocal tract and texture

Keep this voice

A voice file (.voice.json, about 4 KB) contains the two embeddings and the six controls that the model reads. Play it in your own page or script:

<script src="https://austegard.com/experiments/tiny-voca-voices/web/tinyvoca.js"></script>
<script type="module">
  const tts = await TinyVoca.load();
  const voice = await (await fetch("my-voice.voice.json")).json();
  const audio = await tts.speak("Hello there.", voice);   // Float32Array, 24 kHz
  const wavBlob = TinyVoca.wav(audio);
</script>
# Python: pip install onnxruntime numpy soundfile git+https://github.com/n4ze3m/dizione
python speak.py my-voice.voice.json "Hello there." hello.wav

Ready-made files for every preset are in voices/, e.g. voices/F2-adult.voice.json. A link can set the text too: ?text=Hello on this page, or example.html?text=…&voice=voices/M2-baritone.voice.json.

tinyvoca.js · speak.py · a minimal example page

Text

Loading (about 11 MB the first time; cached after that, so later visits work offline).

Phonemes

—

Voice embedding. For each voice the model learned two 192-number vectors, one at the phoneme level and one at the frame level. The first slider walks between F2 (0) and M2 (1) and past them. The four axes point away from that line in fixed random directions; 1.0 is as far as F2 is from M2. Each hint says what that axis did at +1 on F2 in tests. Whether words stay clear depends on the axes' combined distance off the line, shown under the axes. Every random voice up to 1.13 stayed clear, one axis at a time at ±1 lost a word once in 32 tries, and past about 1.15, 6 of 8 random voices garbled a word. "Surprise me" stays within 0.9.

Vocal tract and texture. The waveform comes from a pulse train and noise, each shaped by a filter that the network predicts every 10.7 ms. Formant scale resamples that filter along frequency: below 1, the speaker sounds larger and older. Brightness tilts the voiced filter, and Breath raises or lowers the noise filter.

Whisper, a speech recognizer, transcribed every preset exactly. It did the same with each of the other sliders set to either end, except speed ×2, which slurred one word. Method and measurements: experiments/tiny-voca-voices. Build .