SpawnDev.Phonemizer
MIT-licensed English text-to-phoneme frontend for neural TTS, runs in a browser.
SpawnDev.Phonemizer converts English text to phonemes for neural text-to-speech, with zero dependencies and an embedded pronunciation dictionary. It exists as a permissively licensed alternative to the GPL-3 espeak-ng frontend used by much of the open TTS ecosystem; it takes no code or data from espeak-ng. The dictionary is CMUdict (BSD-2-Clause) and the letter-to-sound rules were learned from CMUdict. It lives inside the SpawnDev.ILGPU.ML repository.
Runs on
Any .NET 10 host including browser (Blazor WebAssembly)
Highlights
- EmbeddedData.CreatePhonemizer() needs no files to fetch or host; ToIpa and ToSymbols produce IPA output.
- Normalizes numbers, times, money, units, arithmetic, ordinals and abbreviations before pronunciation lookup.
- Acronyms are spelled out when the dictionary lacks the word; possessives resolve their stem.
- Define(word, ARPAbet) teaches a custom pronunciation (names, brands, jargon); phones are validated on the way in.
- Homograph handling and letter-to-sound rules learned from CMUdict for out-of-dictionary words (LastUnknownWords reports them).
// Everything is embedded in the assembly - no files to fetch, host or version.
var phonemizer = EmbeddedData.CreatePhonemizer();
phonemizer.ToIpa("She waited for 2 more minutes.");
// ʃiː wˈeɪɾᵻd fɔːɹ tˈuː mˈɔːɹ mˈɪnəts .
phonemizer.ToSymbols("..."); // one IPA symbol per entry, ready to map to token ids
phonemizer.LastUnknownWords; // words the dictionary did not have, whether or not they were sounded outInstall
dotnet add package SpawnDev.PhonemizerBuilding on SpawnDev.Phonemizer?
Private tickets, response targets and a direct line to the engineer who wrote it.