paddlespeech.t2s.frontend.zh_frontend 模块

class paddlespeech.t2s.frontend.zh_frontend.Frontend(g2p_model='g2pW', phone_vocab_path=None, tone_vocab_path=None, use_rhy=False)[来源]

基础: object

方法

add_sp_if_no(phonemes)

韵律标记 #4 添加在句末。

get_phonemes(sentence[, merge_sentences, ...])

执行G2P的主要功能

get_phonemes_ssml(ssml_inputs[, ...])

主要函数,用于支持SSML的G2P。

获取输入ID

获取输入ID SSML

add_sp_if_no(phonemes)[来源]

音韵标记 #4 添加在句子末尾。

get_input_ids(sentence: str, merge_sentences: bool = True, get_tone_ids: bool = False, robot: bool = False, print_info: bool = False, add_blank: bool = False, blank_token: str = '<pad>', to_tensor: bool = True) Dict[str, List[Tensor]][来源]
get_input_ids_ssml(sentence: str, merge_sentences: bool = True, get_tone_ids: bool = False, robot: bool = False, print_info: bool = False, add_blank: bool = False, blank_token: str = '<pad>', to_tensor: bool = True) Dict[str, List[Tensor]][来源]
get_phonemes(sentence: str, merge_sentences: bool = True, with_erhua: bool = True, robot: bool = False, print_info: bool = False) List[List[str]][来源]

执行G2P的主要功能

get_phonemes_ssml(ssml_inputs: list, merge_sentences: bool = True, with_erhua: bool = True, robot: bool = False, print_info: bool = False) List[List[str]][来源]

主函数用于执行带有SSML支持的G2P。

paddlespeech.t2s.frontend.zh_frontend.insert_after_character(lst, item)[来源]

在期末考试后插入 item

paddlespeech.t2s.frontend.zh_frontend.intersperse(lst, item)[来源]