egnch commited on
Commit
be075ba
·
verified ·
1 Parent(s): 92934c6

Add INT8 tiny2.1 onnx/omograph.onnx and update docs for stress=full (v0.2.0)

Browse files
Files changed (3) hide show
  1. NOTICE +4 -2
  2. README.md +7 -9
  3. onnx/omograph.onnx +3 -0
NOTICE CHANGED
@@ -15,8 +15,10 @@ demo.
15
 
16
  The code is licensed under the Apache License 2.0 (see LICENSE).
17
 
18
- The stress dictionary (stress.txt.gz) and unknown-word accent model
19
- (accent.onnx) in src/tiny_voca_ru/frontend/data/ are derived from ruaccent:
 
 
20
  https://github.com/Den4ikAI/ruaccent
21
  https://huggingface.co/ruaccent/accentuator
22
  MIT License (see src/tiny_voca_ru/frontend/data/LICENSE-ruaccent).
 
15
 
16
  The code is licensed under the Apache License 2.0 (see LICENSE).
17
 
18
+ The stress dictionary (stress.txt.gz), unknown-word accent model (accent.onnx),
19
+ homograph tokenizer vocabulary (omograph_vocab.txt.gz), and INT8-quantized
20
+ homograph resolver (omograph.onnx, derived from nn/nn_omograph/tiny2.1) are
21
+ derived from ruaccent:
22
  https://github.com/Den4ikAI/ruaccent
23
  https://huggingface.co/ruaccent/accentuator
24
  MIT License (see src/tiny_voca_ru/frontend/data/LICENSE-ruaccent).
README.md CHANGED
@@ -29,8 +29,8 @@ A Russian adaptation of the 4.5M-parameter [`tiny-voca`](https://github.com/n4ze
29
  | Parameters | 4,534,411 (~18.2 MB `safetensors`, ~21.4 MB `ONNX`) |
30
  | Voices | `F` (female), `M` (male) |
31
  | Output | 24 kHz mono |
32
- | Frontend | Pure-Python Russian normalizer, stress (`lite` / `ruaccent`), 61-symbol IPA |
33
- | Weights | `model.safetensors` + `config.json`, `onnx/model.onnx` + `onnx/model.json` |
34
  | CPU Speed (4 threads) | 115× real-time (PyTorch), 81× real-time (ONNX Runtime) |
35
  | License | Apache-2.0 (bundled `ruaccent` stress data: MIT) |
36
 
@@ -54,8 +54,6 @@ pip install "tiny-voca-ru[onnx]"
54
  # PyTorch + safetensors
55
  pip install "tiny-voca-ru[torch]"
56
 
57
- # Optional: ruaccent for homograph disambiguation
58
- pip install "tiny-voca-ru[ruaccent]"
59
  ```
60
 
61
  ### Python API
@@ -74,7 +72,7 @@ result = synth.save_wav(
74
  speed=1.0, # 0.25 .. 4.0
75
  pitch_shift=0.0, # log-F0 offset (0.058 ≈ +1 semitone)
76
  pitch_range=1.0, # 0.0 .. 3.0
77
- stress="lite", # "lite" | "ruaccent" | "none"
78
  )
79
  ```
80
 
@@ -118,7 +116,7 @@ sf.write("out.wav", audio, 24000)
118
  Follows the [`tiny-voca`](https://github.com/n4ze3m/tiny-voca) architecture and training recipe, adapted for Russian:
119
 
120
  - **Phoneme inventory:** 61-symbol Russian IPA set (5 special, 12 punctuation, 36 consonants with palatalization pairs, 8 vowels including reduced `ɐ` and `ə`).
121
- - **Frontend (`tiny_voca_ru.frontend`):** Pure-Python Russian text normalization, stress placement (`lite` via bundled `stress.txt.gz` + `accent.onnx`, or optional `ruaccent`), and rule-based G2P.
122
  - **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.
123
 
124
  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).
@@ -132,7 +130,7 @@ Evaluated at 104k steps with the default `lite` frontend against the Qwen3-TTS t
132
  | CER | test (696 clips) | 0.46% (`F` 0.43%, `M` 0.49%) | 0.31% |
133
  | WER | test (696 clips) | 2.03% | 1.54% |
134
  | Stress accuracy (CTC top-1) | test dict words (3,905) | 98.5% | 95.6% |
135
- | Homographs (`lite` / `ruaccent`) | homographs (250) | 56.0% / 91.6% | — |
136
  | Numbers ASR exact match | test numeric templates (139) | 90.6% | 92.1% |
137
  | Speed (PyTorch / ONNX CPU, 4 threads) | 55.03 s audio | 115× / 81× RT | — |
138
  | Speed (ONNX Runtime Web, WASM 1 thread) | Chromium | 16.7–21.7× RT | — |
@@ -140,7 +138,7 @@ Evaluated at 104k steps with the default `lite` frontend against the Qwen3-TTS t
140
  ## Limitations
141
 
142
  - Russian only; two voices (`F`, `M`) inheriting Qwen3-TTS pronunciation traits.
143
- - Default `lite` stress does not disambiguate context-dependent homographs; use `stress="ruaccent"` or explicit `+` marks.
144
  - Rule-based numeral case inflection and Latin transliteration can occasionally err on complex syntax or foreign names.
145
 
146
  ## Citation
@@ -169,6 +167,6 @@ If you use this model, please also cite the original [`tiny-voca`](https://huggi
169
  ## License & Attribution
170
 
171
  - **Code & weights:** Apache-2.0 ([LICENSE](LICENSE), [NOTICE](NOTICE)).
172
- - **Stress dictionary & `accent.onnx`:** [ruaccent](https://github.com/Den4ikAI/ruaccent) (MIT).
173
  - **Dataset:** [`egnch/tiny-voca-ru-dataset`](https://huggingface.co/datasets/egnch/tiny-voca-ru-dataset) (CC BY 4.0).
174
  - **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).
 
29
  | Parameters | 4,534,411 (~18.2 MB `safetensors`, ~21.4 MB `ONNX`) |
30
  | Voices | `F` (female), `M` (male) |
31
  | Output | 24 kHz mono |
32
+ | Frontend | Pure-Python Russian normalizer, stress (`lite` / `full`), 61-symbol IPA |
33
+ | Weights | `model.safetensors` + `config.json`, `onnx/model.onnx` + `onnx/model.json`, `onnx/omograph.onnx` |
34
  | CPU Speed (4 threads) | 115× real-time (PyTorch), 81× real-time (ONNX Runtime) |
35
  | License | Apache-2.0 (bundled `ruaccent` stress data: MIT) |
36
 
 
54
  # PyTorch + safetensors
55
  pip install "tiny-voca-ru[torch]"
56
 
 
 
57
  ```
58
 
59
  ### Python API
 
72
  speed=1.0, # 0.25 .. 4.0
73
  pitch_shift=0.0, # log-F0 offset (0.058 ≈ +1 semitone)
74
  pitch_range=1.0, # 0.0 .. 3.0
75
+ stress="lite", # "lite" | "full" | "none"
76
  )
77
  ```
78
 
 
116
  Follows the [`tiny-voca`](https://github.com/n4ze3m/tiny-voca) architecture and training recipe, adapted for Russian:
117
 
118
  - **Phoneme inventory:** 61-symbol Russian IPA set (5 special, 12 punctuation, 36 consonants with palatalization pairs, 8 vowels including reduced `ɐ` and `ə`).
119
+ - **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.
120
  - **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.
121
 
122
  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).
 
130
  | CER | test (696 clips) | 0.46% (`F` 0.43%, `M` 0.49%) | 0.31% |
131
  | WER | test (696 clips) | 2.03% | 1.54% |
132
  | Stress accuracy (CTC top-1) | test dict words (3,905) | 98.5% | 95.6% |
133
+ | Homographs (`lite` / `ruaccent turbo3.1` ref) | homographs (250) | 56.0% / 91.6% | — |
134
  | Numbers ASR exact match | test numeric templates (139) | 90.6% | 92.1% |
135
  | Speed (PyTorch / ONNX CPU, 4 threads) | 55.03 s audio | 115× / 81× RT | — |
136
  | Speed (ONNX Runtime Web, WASM 1 thread) | Chromium | 16.7–21.7× RT | — |
 
138
  ## Limitations
139
 
140
  - Russian only; two voices (`F`, `M`) inheriting Qwen3-TTS pronunciation traits.
141
+ - Default `lite` stress does not disambiguate context-dependent homographs; use `stress="full"` (10 MB INT8 `onnx/omograph.onnx`) or explicit `+` marks.
142
  - Rule-based numeral case inflection and Latin transliteration can occasionally err on complex syntax or foreign names.
143
 
144
  ## Citation
 
167
  ## License & Attribution
168
 
169
  - **Code & weights:** Apache-2.0 ([LICENSE](LICENSE), [NOTICE](NOTICE)).
170
+ - **Stress dictionary, `accent.onnx`, and INT8 `omograph.onnx` (`tiny2.1`):** [ruaccent](https://github.com/Den4ikAI/ruaccent) (MIT).
171
  - **Dataset:** [`egnch/tiny-voca-ru-dataset`](https://huggingface.co/datasets/egnch/tiny-voca-ru-dataset) (CC BY 4.0).
172
  - **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).
onnx/omograph.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:420bb1c83a5c3b5de01692fc7f73be333c6ffb181c30fe32b42294ebaa205b7d
3
+ size 10517401