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
- 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]][来源]