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', '$']