← All models

grapheme-to-phoneme · text · WASM · ~84 MB

Grapheme-to-phoneme (spelling → sound)

The built text models read and rewrite words. This one predicts how a word is pronounced — turning spelling into IPA phonemes, the front-end step every text-to-speech system needs. It's CharsiuG2P, a multilingual byT5 that works on raw bytes, so it phonemizes any script — Latin, Cyrillic, kana, Greek. Type a word, pick a language, and see its sounds. Runs entirely on your device.

At a glance

Model Santyyy/g2p_multilingual_byT5_tiny_16_layers_100-onnx (CharsiuG2P — multilingual byT5 tiny, 16 layers, 100 languages)
Task / pipelinetext2text-generation (grapheme → phoneme) — via transformers.js
Inputa query <lang-code>: word (e.g. <eng-us>: hello) as raw UTF-8 bytes
Outputthe word's IPA transcription (e.g. ˈhɛɫoʊ)
Tokenizerbyte-level (byT5): id = byte + 3, no vocabulary file — so any script encodes losslessly
Quantizationfp32 ONNX — runs on the plain WASM backend, no WebGPU needed
Download~84 MB (encoder + decoder), cached after first load (auto-inits on return)
LicenseMIT (CharsiuG2P) — the weights stay MIT wherever converted to ONNX
Web APIsWebAssembly, 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