Skip to main content

Crate voice_g2p

Crate voice_g2p 

Source

Modules§

espeak
Per-word espeak-ng fallback phonemizer, ported from misaki’s espeak.py.
lexicon
number
stress
Phoneme stress constants and the apply_stress function, ported from misaki’s en.py.
tagger
Averaged perceptron POS tagger.
token
tokenizer
Tokenizer for English G2P.

Structs§

G2P
The main G2P pipeline, ported from misaki’s en.G2P.__call__().
G2PConfig
Configuration for external tool paths used by the G2P pipeline.

Enums§

G2pError

Functions§

english_to_phonemes
Convert English text to a Kokoro-compatible phoneme string.
english_to_phonemes_with_overrides
Convert English text to phonemes with custom word overrides.
espeak_ipa_to_kokoro
Post-process espeak-ng IPA output into Kokoro phoneme format.
text_to_phoneme_chunks
Split text into chunks whose phoneme representations fit within the model’s 510-character context limit.
text_to_phoneme_chunks_with_overrides
Split text into chunks whose phoneme representations fit within the model’s 510-character context limit, with custom word-to-phoneme overrides.