Tiny Vanya
▶ Try it in your browser: it runs on your device, with no server.
Tiny Vanya (in Russian, Малёк Ванёк) is a small text-to-speech model for Russian. It has two voices, male M1 and female F1. It also reads English sentences and English words inside Russian ones. The model runs offline on a laptop CPU, on a server with no GPU, and on iPhone or Mac through Core ML.
Малёк Ванёк — маленькая модель, которая читает русский текст вслух прямо на устройстве. У неё два голоса, мужской и женский, и она умеет читать английские слова. Интернет не нужен.
| Voices | M1 (male), F1 (female) |
| Size | 36M parameters, 150 MB per voice (float32), 44 MB in the browser |
| Speed | 77× real time on 4 CPU threads (ONNX Runtime), 93× with Core ML on a Mac mini M4 Pro |
| Output | 24 kHz mono |
| Intelligibility | Whisper error rate: about 0.3 % of characters in Russian, 2–3 % of words in English |
Samples
| Text | M1 | F1 |
|---|---|---|
| Здравствуйте! Это Тини Ваня, маленькая модель синтеза русской речи, которая работает прямо на устройстве. | ||
| Встречу перенесли на 15:30, четырнадцатого марта, так что у нас осталось около сорока пяти минут. | ||
| Ты правда думал, что я забуду про твой день рождения? | ||
| Осенью в парке особенно тихо: листья медленно падают на дорожки, а воздух пахнет дождём и дымом. | ||
| Мы обновили API, и теперь приложение работает в Windows и на iPhone. | ||
| Hello! I can read English too: this small speech model runs right on your device. |
Quick start
pip install "tiny-vanya[onnx] @ https://huggingface.co/region23/tiny-vanya/resolve/v0.4.8/code/tiny_vanya-0.4.8-py3-none-any.whl"
hf download region23/tiny-vanya --revision v0.4.8 --include "onnx/*" --local-dir tiny-vanya
python -m tiny_vanya.onnx_infer --model tiny-vanya/onnx/m1.onnx --voice M1 \
--text "Здравствуйте! Встречу перенесли на 15:30." --output hello.wav
From Python:
from pathlib import Path
import soundfile as sf
from tiny_vanya.onnx_infer import Speech
speech = Speech(Path("tiny-vanya/onnx/f1.onnx"))
audio = speech.speak("Ты правда думал, что я забуду про твой день рождения?", voice="F1", speed=1.0)
sf.write("question.wav", audio, 24000)
You can pass text of any length; it is read sentence by sentence. Numbers, times and dates are spelled out in Russian, and words in Latin letters are read in English.
With PyTorch, install tiny-vanya[torch] from the same wheel and download pytorch/*. Then run:
python -m tiny_vanya.infer --checkpoint tiny-vanya/pytorch/acoustic-m1.pt --vocoder tiny-vanya/pytorch/vocoder.pt \
--voice M1 --text "Добрый вечер! Как дела?" --output hello.wav
Fixing the reading
Plain text usually needs no markup. When a word comes out wrong, fix it in the text:
- Stress: put
+before the stressed vowel:з+амок,зам+ок. For 312 common homographs the model picks the stress from context:дорог+ой друг, butпойдём другой дор+огой. - ё: write it where it belongs.
- Intonation follows punctuation.
?makes a question,!an exclamation, and,—:…add pauses. - Question focus: put
^before the word the question is about:Ты купил ^хлеб?. - English: write English words in Latin letters. Acronyms in a Russian sentence get Russian letter names (
API→ «эй пи ай»). The exception is acronyms the English dictionary knows as words, such asATLAS.
Speed, pitch and pitch range can be set in code: --speed, --pitch-shift, --pitch-range.
Files
| Path | Contents |
|---|---|
onnx/m1.onnx, onnx/f1.onnx |
Text-to-waveform graph, one per voice (150 MB), plus *.json metadata |
coreml/ |
Core ML packages for iPhone and Mac (iOS 18 / macOS 15) |
swift/TinyVanyaCoreML.swift |
Swift runner for the Core ML packages |
pytorch/ |
PyTorch weights |
web/v0.4.2/ |
Browser copies (44 MB each, int8) |
code/tiny_vanya-0.4.8-py3-none-any.whl |
Python package: text front end, inference, export and training code |
SHA256SUMS |
Checksums |
Core ML. The model is split into two packages, because the number of audio frames depends on the predicted durations. *-durations predicts how long each sound lasts. The host then lays out the frames, and *-speech turns them into audio. swift/TinyVanyaCoreML.swift does all three steps. Text-to-phonemes is not ported to Swift yet: run tiny_vanya.text.phonemize on the host for now.
Calling the ONNX graph directly. Its inputs are phoneme ids and stress marks, produced by tiny_vanya.text.phonemize. The other inputs are the voice index, speed and pitch controls; see onnx/*.json and tiny_vanya/onnx_infer.py. One call speaks at most 32 s, and Speech.speak splits longer sentences for you.
How it was made
The model started from the tiny-voca recipe and was trained from scratch, with no pretrained weights. A large model, Qwen3‑TTS 1.7B Base, recorded about 72 hours of Russian speech in two voices, plus 15 hours of English and mixed sentences. Whisper checked every clip. Tiny Vanya learned to imitate that speech.
The model works in two steps. An acoustic model draws a spectrogram, and a separate vocoder turns it into sound. The first, tiny-voca-style version sounded robotic in Russian. The fix was to show the model the real pitch during training and where the harmonics of that pitch should lie.
Russian pronunciation comes from eSpeak NG, with stress from RUAccent and a hand-checked dictionary. English words go through dizione.
Versions
- v0.4 (28.11.2026): English and mixed sentences, acronyms, homographs resolved by context. Point releases up to v0.4.8 improved the text front end only and left the models unchanged: more homographs, stress for rare word forms, smaller browser copies, safer packaging of the English data, and soft «нь»/«ль» (
день,банька) plus сто́ит where it means "costs" or "is worth". - v0.3: yes/no questions, numbers and dates in the right case.
- v0.2: question intonation check,
^focus markup.
Limitations
- Only two fixed voices; no voice cloning.
- English is American only. English words in Russian sentences are understandable but less clear than in the teacher's speech.
- Rare words outside the dictionaries may get the wrong stress. Use
+to fix it. - Questions rise less at the end than in natural speech.
- In the browser demo, English pronunciation data (about 15 MB) loads with the first Latin word.
License
- Code: Apache‑2.0, derived from tiny-voca. See
LICENSEandNOTICE. - Weights and stress dictionary: Dialogs OpenRAIL (
LICENSE-Dialogs-OpenRAIL.md). Commercial use is allowed, subject to the use restrictions in its Section 2. Those restrictions also apply to anyone you pass the model on to. - Third-party parts: dizione is Apache‑2.0, and CMUdict has a BSD-style license (
LICENSE.cmudict). The teacher, Qwen3‑TTS, is Apache‑2.0. eSpeak NG is GPL‑3.0; it is a separate runtime dependency and is not included here. Training texts come from Tatoeba, Common Voice and Russian Wikipedia; they are not redistributed.
Please do not use the voices to impersonate real people or to pass synthetic speech off as real.
- Downloads last month
- 251