EnglishG2P
Models & Types · AiDotNet.TextToSpeech.FrontEnd
An English grapheme-to-phoneme front end that writes text as espeak-ng’s American English phonemes, in the symbol sequence phonemizer produces for the TTS models trained on them (Pheme, VALL-E, and others built on USLM’s symbol table).
For Beginners
Speech models read sounds, not letters: “though” and “tough” end alike in writing and differently in speech. This turns English text into the list of sounds those models were trained on.
How It Works
Words are looked up in the CMU Pronouncing Dictionary; words it does not list go through the letter-to-sound rules
of NRL Report 7948 (Elovitz et al. 1976). The ARPAbet pronunciation is then written in espeak’s symbols and with
espeak’s conventions (EspeakArpabet), function words take espeak’s weak forms, numbers are read as
espeak reads them, and across word boundaries “the” and “to” change before a vowel, a final r links to a following
vowel, and a final t flaps before an attached “of” or “a”.
The output is the list phonemizer’s espeak backend gives with the separators Pheme uses (phone “|”, word “”),
split as Pheme’s TextTokenizer.to_list splits it: one entry per phone, “” between words, and punctuation
marks as their own entries after the word they follow.
How close it is to espeak. Pronunciations come from a different dictionary than espeak’s, so they differ where
the two dictionaries do. Measured against espeak-ng 1.52 (tools/reference-data/espeak_g2p_reference.py), the
phone error rate is 2.98 % on the 1132 CMU ARCTIC prompts its conventions were checked on, and 3.45 % on held-out
text (chapters II–IV of Alice’s Adventures in Wonderland). Most of the remainder is espeak’s sentence-level
weak forms of function words and individual dictionary differences.
Constructors
| Constructor | Summary |
|---|---|
EnglishG2P() |
Properties
| Property | Summary |
|---|---|
EnglishG2P Default { get; } |
A shared instance (the front end holds no per-call state). |
Methods
| Method | Summary |
|---|---|
IReadOnlyList<string> Phonemize(string text) |
The phone, word-separator and punctuation symbols of text. |
string PhonemizeToString(string text) |
The phonemes as phonemizer writes them: phones joined by “|” within a word and words joined by “_”, with punctuation after the word it follows (for example “h|ə|l|oʊ_w|ɜː|l|d.”). |
Fields
| Field | Summary |
|---|---|
string WordSeparator |
The symbol written between words. |