A byte-level ByT5 model that converts Lithuanian words in standard orthography into their
phoneme sequence. It is the pronunciation front-end for Lithuanian TTS (and useful for forced
alignment, lexicon expansion, and linguistic tooling).
Input: one word, standard Lithuanian spelling, lowercase — e.g. labas
Output: space-separated phonemes in the LIEPA-3 phon alphabet — e.g. l a b a s
Architecture:google/byt5-base (582 M),
fully fine-tuned. Byte-level ⇒ no tokenizer issues with Lithuanian letters or phoneme symbols.
This is the flagship (most accurate). A smaller, ~2× faster variant for edge/embedded use is
svogunas/g2p-lt-byt5-small.
Results
Held-out test set of 3,000 words unseen in training (true generalisation), word-level PER
(phoneme error rate) and exact-match word accuracy:
decoding
PER
word accuracy
greedy
1.88 %
89.2 %
beam = 5
1.86 %
89.3 %
For comparison, the small variant scores 1.98 % / 88.3 %. A larger byt5-large was trained and
did not improve over base (2.57–2.70 % PER) — capacity past byt5-base is wasted on this data,
so base is the recommended model.
Usage
python
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
23tok = AutoTokenizer.from_pretrained("svogunas/g2p-lt-byt5-base")4model = AutoModelForSeq2SeqLM.from_pretrained("svogunas/g2p-lt-byt5-base")56defg2p(word:str)->str:7 ids = tok(word.lower(), return_tensors="pt").input_ids
8 out = model.generate(ids, max_length=64)# greedy; add num_beams=5 for a tiny gain9return tok.decode(out[0], skip_special_tokens=True)1011print(g2p("labas"))# l a b a s12print(g2p("abaravičiene"))# a b a r a v' i tS' ie n' e
Feed one word at a time (the model is trained on isolated words). For a sentence, split on
whitespace, look words up, and handle punctuation/numbers in your own front-end.
Phoneme notation (LIEPA-3 phon alphabet)
Phonemes are space-separated. Conventions:
Lowercase base symbols for the core sounds.
' after a consonant marks palatalization (Lithuanian minkštumas): v', tS', n'.
Full inventory (~90 symbols) observed in the training lexicon:
a i e s s' n' t' t u oo k m r' n r k' l' p j j' m' I v' p' ee d d' l ii S' E v w
g' g uu U aA o S b' tS' b A Aa Ee Uo Z' aa Oo Ii Ea ea ie z J ts' eA z' Z uo O iI
W uU f' dZ' f oO N iE eE N' Uu Ie R' R uO x h L' ts M' x' h' L M tS dZ dz' dz
Training data
LIEPA-3 word+phoneme TextGrids (phon/) — the bulk of the lexicon.
Merged at the variant level into a 233 k-word pronunciation lexicon, one consistent notation,
99.5 % mean cross-source agreement, dominant variant kept; 3 k words held out for the test above.
Excluded by design:medical (different SAMPA notation — needs re-extraction) and dialectal
(phonetic, not orthographic, transcripts).
Fine-tuned from google/byt5-base, 5 epochs, lr 5e-4, load_best_model_at_end on eval loss.
Limitations
Isolated-word model: no sentence-level context, sandhi, or homograph disambiguation.
Trained on standard Lithuanian; dialectal pronunciation is out of scope.
Stress placement follows the lexicon's conventions; verify against your TTS phoneme set.
License & attribution
Released under CC BY 4.0. Training data (LIEPA-3, EMO) is CC BY 4.0 from
VDU / CLARIN-LT — please attribute them when you use this model:
Pronunciation lexicon derived from LIEPA-3 and the VDU Lithuanian emotional speech corpus,
distributed via CLARIN-LT (CC BY 4.0).
Citation
bibtex
1@misc{g2p-lt-byt5-base,
2 title = {g2p-lt-byt5-base: Lithuanian grapheme-to-phoneme (ByT5)},
3 author = {Smaliukas, Arūnas},
4 year = {2026},
5 note = {Fine-tuned from google/byt5-base on a LIEPA-3 + EMO pronunciation lexicon (CC BY 4.0)},
6 url = {https://huggingface.co/svogunas/g2p-lt-byt5-base}
7}