espnet2.text.phoneme_tokenizer.pyopenjtalk_g2p_accent
Less than 1 minute
espnet2.text.phoneme_tokenizer.pyopenjtalk_g2p_accent
espnet2.text.phoneme_tokenizer.pyopenjtalk_g2p_accent(text) → List[str]
Convert input text to phonemes with accent information.
This function uses the PyOpenJTalk library to extract phonemes from input text while also incorporating accentuation details. It returns a list of phonemes, each represented as a string, where the accent type and position are included.
- Parameters:text (str) – The input text to be converted into phonemes.
- Returns: A list of phonemes with accent information.
- Return type: List[str]
Examples
>>> pyopenjtalk_g2p_accent("こんにちは。")
['k', 'o', 'N', 'n', 'i', 'ch', 'i', 'w', 'a']
NOTE
This function assumes that the input text is in Japanese.