espnet2.text.phoneme_tokenizer.pyopenjtalk_g2p_prosody
Less than 1 minute
espnet2.text.phoneme_tokenizer.pyopenjtalk_g2p_prosody
espnet2.text.phoneme_tokenizer.pyopenjtalk_g2p_prosody(text: str, drop_unvoiced_vowels: bool = True) β List[str]
Extract phoneme + prosoody symbol sequence from input full-context labels.
The algorithm is based on Prosodic features control by symbols as input of sequence-to-sequence acoustic modeling for neural TTS with some r9y9βs tweaks.
- Parameters:
- text (str) β Input text.
- drop_unvoiced_vowels (bool) β whether to drop unvoiced vowels.
- Returns: List of phoneme + prosody symbols.
- Return type: List[str]
Examples
>>> from espnet2.text.phoneme_tokenizer import pyopenjtalk_g2p_prosody
>>> pyopenjtalk_g2p_prosody("γγγ«γ‘γ―γ")
['^', 'k', 'o', '[', 'N', 'n', 'i', 'ch', 'i', 'w', 'a', '$']