G2P for the reading voices (v0.5.0) #8
Reference in New Issue
Block a user
Delete Branch "feature/g2p"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Day 4 read-aloud (v0.5.0): our own G2P for the Piper voices (Mark's decision: Piper + own G2P, Czech, German and English).
The voices were trained on espeak-ng IPA; espeak-ng is GPL, so
liber_lang::g2pwrites the same conventions itself (stress mark before the stressed vowel,ː, words separated by spaces,. , ? ! ; :kept):cs: digraphs (ch, dž, ou, au, eu, ej), ď ť ň and d/t/n + i/í/ě, bě/pě/vě/fě → je, mě → mɲe, ř / voiceless ř̊, n + k/g → ŋ, regressive voicing assimilation and final devoicing (a one-consonant preposition is left to the next word), syllabic r and l, stress on the first syllable, unstressed clitics. Latin is read with these rules.de: stress (first syllable; after be-/ge-/er-/ver-/zer-/ent-/emp-/miss- in longer words; -ieren, -tion, -erei), vowel length (doubled, silent h, open syllable, single final consonant except short function words, -uch), ə/ɐ in endings, vocalic r, ch → x/ç, sch, st-/sp-, z, doubled consonants, final devoicing, -ig → ɪç, ei/ai, eu/äu, au, ie.en: CMUdict ARPABET → espeak en-us IPA (Lexicon::from_cmudict, capped: hostile input; the app fetches the dictionary), ɜː/ɚ, flapping, secondary stress; letter-to-sound rules for unknown words.num: numbers as words (cs, de, en; years 1100–1999 in en/de).tokens: NFD code points with the voice's vowel clusters merged (aɪ,oʊ…): exactly how Piper 1.5 feeds its models.Lang::Csadded (no lemma rules).Tests (
tests/g2p.rs, 6): Czech 37/37 and German 30/30 on hand-written golds (floors 95% / 90%), English dictionary path and rules, sentences with numbers and punctuation, token splitting (ř, ç, clusters), hostile dictionaries. Workspace 116 green; clippy 0; deps 0 not allowed.Self-review
^ _ p _ … $) was read from its documentation/source only to match the model's input format.