espnet2.text.phoneme_tokenizer.pypinyin_g2p_phone_without_prosody
Less than 1 minute
espnet2.text.phoneme_tokenizer.pypinyin_g2p_phone_without_prosody
espnet2.text.phoneme_tokenizer.pypinyin_g2p_phone_without_prosody(text) → List[str]
Convert Chinese text to phonemes without prosody using pypinyin.
This function takes a string of Chinese text and converts it into a list of phonemes. The conversion is done using the pypinyin library, and the output does not include any prosodic features.
- Parameters:text (str) – The input Chinese text to be converted to phonemes.
- Returns: A list of phonemes corresponding to the input text.
- Return type: List[str]
Examples
>>> from espnet2.text.phoneme_tokenizer import pypinyin_g2p_phone_without_prosody
>>> pypinyin_g2p_phone_without_prosody("你好")
['n', 'i', 'h', 'a', 'o']
NOTE
This function uses the pypinyin library’s normal style for phoneme conversion, which does not include tone markings or prosodic symbols.