File size: 6,740 Bytes
35b9269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92934c6
35b9269
9d40c7c
a6baa5c
 
 
35b9269
a6baa5c
 
 
9d40c7c
a6baa5c
be075ba
 
a6baa5c
 
35b9269
a6baa5c
35b9269
a6baa5c
 
 
 
 
 
35b9269
a6baa5c
35b9269
a6baa5c
35b9269
 
9d40c7c
a6baa5c
35b9269
9d40c7c
a6baa5c
35b9269
 
 
a6baa5c
35b9269
 
 
 
 
9d40c7c
35b9269
 
 
 
 
9d40c7c
 
 
 
be075ba
35b9269
 
 
 
 
 
a6baa5c
35b9269
 
a6baa5c
35b9269
a6baa5c
35b9269
9d40c7c
35b9269
a6baa5c
be075ba
a6baa5c
35b9269
a6baa5c
35b9269
a6baa5c
35b9269
a6baa5c
35b9269
a6baa5c
 
 
 
 
be075ba
a6baa5c
 
 
35b9269
a6baa5c
35b9269
9d40c7c
be075ba
a6baa5c
35b9269
a6baa5c
35b9269
a6baa5c
 
 
 
 
 
 
 
 
35b9269
a6baa5c
35b9269
 
 
 
 
 
 
 
 
 
a6baa5c
35b9269
9d40c7c
be075ba
a6baa5c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
---
license: apache-2.0
language:
- ru
pipeline_tag: text-to-speech
datasets:
- egnch/tiny-voca-ru-dataset
tags:
- text-to-speech
- tts
- russian
- onnx
- safetensors
- lightweight
- tiny-voca
---

# tiny-voca-ru

A Russian adaptation of the 4.5M-parameter [`tiny-voca`](https://github.com/n4ze3m/tiny-voca) text-to-speech model with female and male voices, trained from scratch on [`egnch/tiny-voca-ru-dataset`](https://huggingface.co/datasets/egnch/tiny-voca-ru-dataset).

- **Demo:** https://huggingface.co/spaces/egnch/tiny-voca-ru-demo
- **Dataset:** https://huggingface.co/datasets/egnch/tiny-voca-ru-dataset
- **Code:** https://github.com/yilbegan/tiny-voca-ru
- **PyPI:** https://pypi.org/project/tiny-voca-ru/

| Property | Value |
| --- | --- |
| Parameters | 4,534,411 (~18.2 MB `safetensors`, ~21.4 MB `ONNX`) |
| Voices | `F` (female), `M` (male) |
| Output | 24 kHz mono |
| Frontend | Pure-Python Russian normalizer, stress (`lite` / `full`), 61-symbol IPA |
| Weights | `model.safetensors` + `config.json`, `onnx/model.onnx` + `onnx/model.json`, `onnx/omograph.onnx` |
| CPU Speed (4 threads) | 115× real-time (PyTorch), 81× real-time (ONNX Runtime) |
| License | Apache-2.0 (bundled `ruaccent` stress data: MIT) |

## Audio Samples

| Voice | Text | Audio |
| --- | --- | --- |
| `F` | Здравствуйте! Это tiny-voca-ru, маленькая модель синтеза речи на русском языке. | <audio controls src="https://huggingface.co/egnch/tiny-voca-ru/resolve/main/samples/f_greeting.wav"></audio> |
| `M` | Здравствуйте! Это tiny-voca-ru, маленькая модель синтеза речи на русском языке. | <audio controls src="https://huggingface.co/egnch/tiny-voca-ru/resolve/main/samples/m_greeting.wav"></audio> |
| `F` | Встречу перенесли на 15:30, 14 марта, так что у нас осталось около 45 минут. Билет стоит 1250 рублей. | <audio controls src="https://huggingface.co/egnch/tiny-voca-ru/resolve/main/samples/f_numbers.wav"></audio> |
| `M` | Ты правда думал, что я забуду про твой день рождения? Конечно, нет! | <audio controls src="https://huggingface.co/egnch/tiny-voca-ru/resolve/main/samples/m_question.wav"></audio> |

## Usage

### Installation

```bash
# ONNX Runtime inference (no PyTorch)
pip install "tiny-voca-ru[onnx]"

# PyTorch + safetensors
pip install "tiny-voca-ru[torch]"

```

### Python API

```python
from tiny_voca_ru import Synthesizer

synth = Synthesizer.from_pretrained("egnch/tiny-voca-ru")
# ONNX Runtime backend
# synth = Synthesizer.from_pretrained("egnch/tiny-voca-ru", backend="onnx")

result = synth.save_wav(
    "Здравствуйте! Встречу перенесли на 15:30, 14 марта.",
    "hello.wav",
    voice="M",  # "F" or "M"
    speed=1.0,  # 0.25 .. 4.0
    pitch_shift=0.0,  # log-F0 offset (0.058 ≈ +1 semitone)
    pitch_range=1.0,  # 0.0 .. 3.0
    stress="lite",  # "lite" | "full" | "none"
)
```

### CLI

```bash
tiny-voca-ru-speak   --voice F   --text "Привет! Билет стоит 1250 рублей."   --output out.wav
```

Pass `--backend onnx` to use ONNX Runtime. Manual stress can be marked with `+` before the stressed vowel (`зам+ок`).

## Changes from `tiny-voca`

Follows the [`tiny-voca`](https://github.com/n4ze3m/tiny-voca) architecture and training recipe, adapted for Russian:

- **Phoneme inventory:** 61-symbol Russian IPA set (5 special, 12 punctuation, 36 consonants with palatalization pairs, 8 vowels including reduced `ɐ` and `ə`).
- **Frontend (`tiny_voca_ru.frontend`):** Pure-Python Russian text normalization, stress placement (`lite` via bundled `stress.txt.gz` + `accent.onnx`, or `full` via 10 MB INT8 `onnx/omograph.onnx`), and rule-based G2P.
- **Training:** Trained from scratch for 104,000 steps (4.9 h on 1× NVIDIA L40S) on 18,517 aligned clips (21.96 h) from [`egnch/tiny-voca-ru-dataset`](https://huggingface.co/datasets/egnch/tiny-voca-ru-dataset), using `facebook/wav2vec2-lv-60-espeak-cv-ft` CTC durations during data preparation.

Custom-voice fine-tuning scripts (`tiny-voca-ru-prepare`, `tiny-voca-ru-train`) are available in the [GitHub repository](https://github.com/yilbegan/tiny-voca-ru).

## Evaluation

Evaluated at 104k steps with the default `lite` frontend against the Qwen3-TTS teacher on the test split (696 clips, Whisper `large-v3-turbo` ASR). CPU speed measured on AMD Ryzen 5 3600X (4 threads, 55.03 s of audio).

| Metric | Split | tiny-voca-ru | Teacher |
| --- | --- | --- | --- |
| CER | test (696 clips) | 0.46% (`F` 0.43%, `M` 0.49%) | 0.31% |
| WER | test (696 clips) | 2.03% | 1.54% |
| Stress accuracy (CTC top-1) | test dict words (3,905) | 98.5% | 95.6% |
| Homographs (`lite` / `ruaccent turbo3.1` ref) | homographs (250) | 56.0% / 91.6% | — |
| Numbers ASR exact match | test numeric templates (139) | 90.6% | 92.1% |
| Speed (PyTorch / ONNX CPU, 4 threads) | 55.03 s audio | 115× / 81× RT | — |
| Speed (ONNX Runtime Web, WASM 1 thread) | Chromium | 16.7–21.7× RT | — |

## Limitations

- Russian only; two voices (`F`, `M`) inheriting Qwen3-TTS pronunciation traits.
- Default `lite` stress does not disambiguate context-dependent homographs; use `stress="full"` (10 MB INT8 `onnx/omograph.onnx`) or explicit `+` marks.
- Rule-based numeral case inflection and Latin transliteration can occasionally err on complex syntax or foreign names.

## Citation

```bibtex
@misc{chetvertkov2026tinyvocaru,
  author = {Chetvertkov, Evgeniy},
  title  = {tiny-voca-ru: A 4.5M-Parameter Russian Text-to-Speech Model},
  year   = {2026},
  url    = {https://huggingface.co/egnch/tiny-voca-ru},
  note   = {ORCID: https://orcid.org/0009-0006-6158-2624}
}
```

If you use this model, please also cite the original [`tiny-voca`](https://huggingface.co/n4ze3m/tiny-voca):

```bibtex
@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}
}
```

## License & Attribution

- **Code & weights:** Apache-2.0 ([LICENSE](LICENSE), [NOTICE](NOTICE)).
- **Stress dictionary, `accent.onnx`, and INT8 `omograph.onnx` (`tiny2.1`):** [ruaccent](https://github.com/Den4ikAI/ruaccent) (MIT).
- **Dataset:** [`egnch/tiny-voca-ru-dataset`](https://huggingface.co/datasets/egnch/tiny-voca-ru-dataset) (CC BY 4.0).
- **Acknowledgements:** [`tiny-voca`](https://github.com/n4ze3m/tiny-voca) (Apache-2.0), alignment calibration inspired by [słyszę głosy](https://github.com/damaon/slyszeglosy) (Apache-2.0), Qwen3-TTS (Apache-2.0).