At a glance
| Model | Santyyy/g2p_multilingual_byT5_tiny_16_layers_100-onnx (CharsiuG2P — multilingual byT5 tiny, 16 layers, 100 languages) |
|---|---|
| Task / pipeline | text2text-generation (grapheme → phoneme) — via transformers.js |
| Input | a query <lang-code>: word (e.g. <eng-us>: hello) as raw UTF-8 bytes |
| Output | the word's IPA transcription (e.g. ˈhɛɫoʊ) |
| Tokenizer | byte-level (byT5): id = byte + 3, no vocabulary file — so any script encodes losslessly |
| Quantization | fp32 ONNX — runs on the plain WASM backend, no WebGPU needed |
| Download | ~84 MB (encoder + decoder), cached after first load (auto-inits on return) |
| License | MIT (CharsiuG2P) — the weights stay MIT wherever converted to ONNX |
| Web APIs | WebAssembly, Web Workers — all Baseline widely available |
Phonemize
Why byte-level?
CharsiuG2P is a byT5 — it has no learned word vocabulary. Text is just UTF-8 bytes (each byte → id = byte + 3), so a Cyrillic, Japanese, or Greek word is as encodable as an English one, and the model can phonemize all of them. It's a small (tiny) model decoding one word at a time, so the odd rare word may get a trailing artifact — the output is the model's real prediction, not a dictionary lookup. Everything runs locally.
Use-case ladder
Basics · Byte-Level byT5 & IPA Articulatory Explorer
Inspect how <lang>: word maps across Latin, Greek, Cyrillic, Arabic, Devanagari, and Kana into raw UTF-8 bytes (byte + 3), colour-coded IPA articulatory segments, and live cross-accent splits — with Show the code synced to worker.js.
Practical · Batch TTS Pronunciation Dictionary & SSML Builder
Batch-phonemize clinical glossaries, tech brand names, or uploaded .txt/.csv/.json wordlists in 26 languages and export ready-to-use W3C SSML <phoneme> XML, .json, .tsv, and formula-safe .csv.
Wild · Multilingual Rhyme Finder, False-Friends & Stress Lab
Probe English -ough spelling chaos, rank custom rhymes and near-rhymes by phoneme-tail Levenshtein distance, compare cross-script cognates & false friends, and inspect derivational stress jumps vs context-free homographs.
Multi-model · Pronunciation Pipeline (CharsiuG2P → KittenTTS Nano 0.8)
Chain CharsiuG2P byT5 (~84 MB) with KittenTTS Nano 0.8 (~27.6 MB, 24 kHz StyleTTS 2) in isolated Web Workers to compare neural IPA (US & UK) side-by-side against rule-based eSpeak-NG IPA and live spoken waveforms.