v0.2.2: foreign words with English readings, stress and rhythm
Browse filesFiles changed (3)
- README.md+16-7
- THIRD_PARTY_LICENSES.mdAdded+41
- onnx/tiny-voca-vi-v0.2.2-hnvocos-fp16.onnxAdded+3
14 unmodified lines151617181920214 unmodified lines2627282930313213 unmodified lines464748495051525314 unmodified lines686970717273742 unmodified lines777879808182831 unmodified line8586878814 unmodified lines- tiny-voca---# TinyVoca-Vi (v0.2.1)Ultra-lightweight (**4.77M parameters**, **12.39 MB Brotli**, **3 Northern Vietnamese female voices in ONE ONNX file**, **24 kHz mono**) Text-to-Speech model designed to run **100% client-side in the browser** via single-thread ONNX Runtime Web (WASM SIMD)—no backend, no Python at runtime, works offline after first load.4 unmodified lines- `voice_id = 1` — **Quỳnh Anh** *(recommended default)*: Storytelling timbre, clearest tones (**`0.09%` CER**)- `voice_id = 2` — **Trúc Ly**: Youngest, brisk & expressive timbre- `voice_id = 0` — **Mai Anh**: Crisp news-anchor timbre- **Front-end:** `~12 KB` gzipped deterministic rule-based Northern Vietnamese G2P (`web/g2p.js` / `src/tiny_voca_vi/g2p.py`)—zero binary dictionary download.## What's New in v0.2.113 unmodified lines| File | Voices | Params | Raw / Brotli | Native 1T RTF | Minimal-Pair Tone Acc | Notes ||---|---:|---:|---:|---:|---:|---|| **`onnx/tiny-voca-vi-v0.2.1-hnvocos-fp16.onnx`** | **3** | **4.77M** | `14.32 MB` / `12.39 MB` | **`0.0125`** (~80× RT) | 79.2% (*Quỳnh Anh*) · 91.7% (*Trúc Ly*) · 75.0% (*Mai Anh*); wider test 86.6 / 84.0 / 79.5% | **Recommended** · minimum pauses, clear *p*, `0.09%` CER (*Quỳnh Anh*) || `checkpoints/tiny-voca-vi-v0.2.1-hnvocos.pt` | 3 | 4.77M | PyTorch weights + config | — | — | v0.2 fine-tuned 8k steps || `onnx/tiny-voca-vi-v0.2-hnvocos-fp16.onnx` | **3** | **4.77M** | `14.32 MB` / `12.37 MB` | **`0.0125`** (~80× RT) | **87.5%** (*Quỳnh Anh*) · **85.4%** (*Trúc Ly*) · **77.1%** (*Mai Anh*) | v0.2 · echo-free `HN-Vocos`, `0.16%` CER (*Quỳnh Anh*) || `checkpoints/tiny-voca-vi-v0.2-hnvocos-26k.pt` | 3 | 4.77M | PyTorch weights + config | — | — | Trained 26k steps on 12.11 h clean data || `onnx/tiny-voca-vi-v0.1-1024-fp16.onnx` | 1 | 4.66M | `13.84 MB` / `9.99 MB` | `0.0098` (~102× RT) | `79.2%` (*Mai Anh*) | Legacy v0.1 (`Vocos-1M`, `0.00%` CER) |14 unmodified lines| **Trúc Ly** (`2`) | *Hôm nay thời tiết Hà Nội mát mẻ, nắng nhẹ và không có mưa.* | <audio controls src="https://huggingface.co/datmt24/tiny-voca-vi/resolve/main/samples/v0.2_truc_ly_ha_noi.wav"></audio> || **Quỳnh Anh** (`1`) | *Tiếng Việt có sáu thanh điệu rất rõ ràng, đặc biệt là thanh ngã và thanh nặng.* | <audio controls src="https://huggingface.co/datmt24/tiny-voca-vi/resolve/main/samples/v0.2_quynh_anh_sau_thanh.wav"></audio> |## ONNX Interface (v0.2 / v0.2.1)**Inputs:**- `phoneme_ids`: `int64[1, T]`2 unmodified lines- `voice_id`: `int64[1]` (`0`=*Mai Anh*, `1`=*Quỳnh Anh*, `2`=*Trúc Ly*)- `speed`: `float32[1]` (`0.7–1.5`)- `pitch_shift`: `float32[1]` (`-4.0` to `+4.0` semitones)- `pause`: `float32[1]` (`0.5–2.0`, scales `tone_id == 0` durations and, in v0.2.1, the minimum pauses)**Outputs:**- `audio`: `float32[1, N * 256]` (24 kHz mono PCM)1 unmodified line## License & Attribution**Apache-2.0**. Architecture and export conventions adapted from [`n4ze3m/tiny-voca`](https://github.com/n4ze3m/tiny-voca) (Apache-2.0); training audio distilled from [`pnnbao-ump/VieNeu-TTS-v3-Turbo`](https://huggingface.co/pnnbao-ump/VieNeu-TTS-v3-Turbo) (Apache-2.0, presets *Mai Anh*, *Quỳnh Anh*, *Trúc Ly*) over `wikimedia/wikipedia` `20231101.vi` (CC BY-SA 4.0); offline CTC alignment with `facebook/wav2vec2-lv-60-espeak-cv-ft` (Apache-2.0); filtering & eval with `vinai/PhoWhisper-medium` (BSD-3-Clause).14 unmodified lines151617181920214 unmodified lines262728293031323334353637383913 unmodified lines53545556575859606114 unmodified lines767778798081822 unmodified lines85868788899091921 unmodified line9495969714 unmodified lines- tiny-voca---# TinyVoca-Vi (v0.2.2)Ultra-lightweight (**4.77M parameters**, **12.39 MB Brotli**, **3 Northern Vietnamese female voices in ONE ONNX file**, **24 kHz mono**) Text-to-Speech model designed to run **100% client-side in the browser** via single-thread ONNX Runtime Web (WASM SIMD)—no backend, no Python at runtime, works offline after first load.4 unmodified lines- `voice_id = 1` — **Quỳnh Anh** *(recommended default)*: Storytelling timbre, clearest tones (**`0.09%` CER**)- `voice_id = 2` — **Trúc Ly**: Youngest, brisk & expressive timbre- `voice_id = 0` — **Mai Anh**: Crisp news-anchor timbre- **Front-end:** `~15 KB` gzipped deterministic rule-based Northern Vietnamese G2P (`web/g2p.js` / `src/tiny_voca_vi/g2p.py`) plus an English word list (`web/en_lexicon.js`, ~250 KB gzipped, derived from CMUdict).## What's New in v0.2.2- **Foreign words are read as English, with stress and rhythm:** about 39,000 English words and names are respelled from CMUdict (*lake* → "lếch", *update* → "ấp đết"). Other words keep the letter rules; main stress is guessed with the Latin rule (*Palsada* → **pan**-sa-đa).- **New `stress` input in the ONNX graph:** per-token duration, pitch and energy offsets. No retraining: the weights are those of v0.2.1 and Vietnamese text without foreign words gives identical audio (max difference 0 on 60 sentences, 3 voices). **Breaking for direct ONNX users:** `stress` is required; pass `(1, 0, 0)` for every token to get the v0.2.1 behaviour.- **Uneven rhythm:** middle syllables of a foreign word are compressed, so syllables no longer arrive on an even beat. On 400 held-out words in a Vietnamese carrier sentence, `whisper-large-v3-turbo` writes the English word for 145–148 with stress against 113–131 without (per voice). On a separate set of 300 words, *Quỳnh Anh*, the new readings alone went from 49 to 82.- **Known limits:** consonant clusters (*cl-*, *st-*) are still rarely recognised, because the model was trained on Vietnamese only; names outside the dictionary are read by letter rules.## What's New in v0.2.113 unmodified lines| File | Voices | Params | Raw / Brotli | Native 1T RTF | Minimal-Pair Tone Acc | Notes ||---|---:|---:|---:|---:|---:|---|| **`onnx/tiny-voca-vi-v0.2.2-hnvocos-fp16.onnx`** | **3** | **4.77M** | `14.33 MB` / `12.39 MB` | **`0.0123`** (~80× RT) | as v0.2.1 (same weights) | **Recommended** · foreign words with stress, `stress` input || `onnx/tiny-voca-vi-v0.2.1-hnvocos-fp16.onnx` | **3** | **4.77M** | `14.32 MB` / `12.39 MB` | **`0.0125`** (~80× RT) | 79.2% (*Quỳnh Anh*) · 91.7% (*Trúc Ly*) · 75.0% (*Mai Anh*); wider test 86.6 / 84.0 / 79.5% | minimum pauses, clear *p*, `0.09%` CER (*Quỳnh Anh*) || `checkpoints/tiny-voca-vi-v0.2.1-hnvocos.pt` | 3 | 4.77M | PyTorch weights + config | — | — | v0.2 fine-tuned 8k steps (also the weights of v0.2.2) || `onnx/tiny-voca-vi-v0.2-hnvocos-fp16.onnx` | **3** | **4.77M** | `14.32 MB` / `12.37 MB` | **`0.0125`** (~80× RT) | **87.5%** (*Quỳnh Anh*) · **85.4%** (*Trúc Ly*) · **77.1%** (*Mai Anh*) | v0.2 · echo-free `HN-Vocos`, `0.16%` CER (*Quỳnh Anh*) || `checkpoints/tiny-voca-vi-v0.2-hnvocos-26k.pt` | 3 | 4.77M | PyTorch weights + config | — | — | Trained 26k steps on 12.11 h clean data || `onnx/tiny-voca-vi-v0.1-1024-fp16.onnx` | 1 | 4.66M | `13.84 MB` / `9.99 MB` | `0.0098` (~102× RT) | `79.2%` (*Mai Anh*) | Legacy v0.1 (`Vocos-1M`, `0.00%` CER) |14 unmodified lines| **Trúc Ly** (`2`) | *Hôm nay thời tiết Hà Nội mát mẻ, nắng nhẹ và không có mưa.* | <audio controls src="https://huggingface.co/datmt24/tiny-voca-vi/resolve/main/samples/v0.2_truc_ly_ha_noi.wav"></audio> || **Quỳnh Anh** (`1`) | *Tiếng Việt có sáu thanh điệu rất rõ ràng, đặc biệt là thanh ngã và thanh nặng.* | <audio controls src="https://huggingface.co/datmt24/tiny-voca-vi/resolve/main/samples/v0.2_quynh_anh_sau_thanh.wav"></audio> |## ONNX Interface (v0.2 to v0.2.2)**Inputs:**- `phoneme_ids`: `int64[1, T]`2 unmodified lines- `voice_id`: `int64[1]` (`0`=*Mai Anh*, `1`=*Quỳnh Anh*, `2`=*Trúc Ly*)- `speed`: `float32[1]` (`0.7–1.5`)- `pitch_shift`: `float32[1]` (`-4.0` to `+4.0` semitones)- `pause`: `float32[1]` (`0.5–2.0`, scales `tone_id == 0` durations and, from v0.2.1 on, the minimum pauses)- `stress` (**v0.2.2 only, required**): `float32[1, T, 3]` = duration factor, pitch offset in semitones, energy offset per token; neutral is `(1, 0, 0)`. Built by `stress_features()` / `stressFeatures()`.**Outputs:**- `audio`: `float32[1, N * 256]` (24 kHz mono PCM)1 unmodified line## License & Attribution**Apache-2.0**. Architecture and export conventions adapted from [`n4ze3m/tiny-voca`](https://github.com/n4ze3m/tiny-voca) (Apache-2.0); training audio distilled from [`pnnbao-ump/VieNeu-TTS-v3-Turbo`](https://huggingface.co/pnnbao-ump/VieNeu-TTS-v3-Turbo) (Apache-2.0, presets *Mai Anh*, *Quỳnh Anh*, *Trúc Ly*) over `wikimedia/wikipedia` `20231101.vi` (CC BY-SA 4.0); English readings derived from [CMUdict](https://github.com/cmusphinx/cmudict) (BSD-style); offline CTC alignment with `facebook/wav2vec2-lv-60-espeak-cv-ft` (Apache-2.0); filtering & eval with `vinai/PhoWhisper-medium` (BSD-3-Clause).
1234567891011121314151617181920212223242526272829303132333435363738394041# Third-party licenses
## CMU Pronouncing Dictionary (CMUdict)
Readings in `src/tiny_voca_vi/en_lexicon.txt` and `web/en_lexicon.js` are derived from CMUdict (https://github.com/cmusphinx/cmudict).
```Copyright (C) 1993-2015 Carnegie Mellon University. All rights reserved.
Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditionsare met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. The contents of this file are deemed to be source code.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
This work was supported in part by funding from the Defense AdvancedResearch Projects Agency, the Office of Naval Research and the NationalScience Foundation of the United States of America, and by membercompanies of the Carnegie Mellon Sphinx Speech Consortium. We acknowledgethe contributions of many volunteers to the expansion and improvement ofthis dictionary.
THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' ANDANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULARPURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITYNOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANYTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.```123version https://git-lfs.github.com/spec/v1oid sha256:5364cbf35cd55d7546dce91d6d48b93a67c2bd2426bd952ab267362c07b8915csize 14328012README.md+16-7
THIRD_PARTY_LICENSES.mdAdded+41
onnx/tiny-voca-vi-v0.2.2-hnvocos-fp16.onnxAdded+3