Instructions to use willwade/byt5-p2g-multilingual with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use willwade/byt5-p2g-multilingual with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="willwade/byt5-p2g-multilingual")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("willwade/byt5-p2g-multilingual", device_map="auto") - Notebooks
- Google Colab
- Kaggle
ByT5 multilingual P2G (IPA β grapheme)
One byte-level model, 122 languages, IPA pronunciation β word (spelling).
Fine-tuned from google/byt5-small (3 epochs, 2.67M pairs).
Input convention: <lang>: IPA tokens (<eng>: h Ι l oΚ). Output:
the spelled word (hello). Handles made-up pronunciations (e.g.
<eng>: m uΛ β moo).
Results (test split, 4k sample)
| exact | notes | |
|---|---|---|
| micro (all 122) | 0.509 | macro 0.647; TER 0.491 |
| Italian | 0.967 | vs 0.229 for the per-language WFST tier |
| German | 0.924 | vs 0.495 WFST |
| Spanish | 0.180 raw | near-zero char error: valid b/v homophone spellings (abalanzaresβavalanzares); homophone-credited scoring pending |
| English | 0.302 | homophone-rich; deep orthography |
| Mandarin/Cantonese | 0.000 | logographic |
P2G is one-to-many (homophones); exact-match understates quality where valid alternative spellings exist.
Use as the OOV tier
Built for floravox as tier 3 behind FST lexicons (exact) and per-language Phonetisaurus WFSTs β the model only handles true OOV, so greedy decoding latency is acceptable and cached in practice.
HF-format weights (config/tokenizer/safetensors) will accompany the next release; the initial ONNX export was faulty and has been removed pending re-export. Numbers above are from the HF checkpoints.
Status: v1 preview (evaluation only)
These are v1 results β the model card numbers stand, but v1 weights are not available (lost in an infrastructure mishap before publishing; see repo history). v2 is imminent: retrained on a dialect-keyed corpus (eng-US/UK, por-BR/PT, spa-ES/LatAm, ...), with an improved recipe, in small (300M) and tiny (17M) sizes, with validated ONNX exports. Weights + ONNX + usage guide will land here shortly.
Training data & licence
Corpus merged from WikiPron (CC BY-SA 4.0; 117 languages) and gruut lexicons (MIT; 13 languages). Weights are released CC BY-SA 4.0 under the conservative reading that models trained on share-alike data inherit it. Attribution: Wiktionary/WikiPron (CUNY-CL), gruut (rhasspy), Google byt5 base (Apache-2.0).
Training code: voicegarden-lexicons/scripts/train_byt5 βone GPU-day on an RTX 3090 (~$6 rented).
Model tree for willwade/byt5-p2g-multilingual
Base model
google/byt5-small