paddlespeech.t2s.frontend.zh_frontend module

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

Bases: object

Methods

get_input_ids_ssml(sentence[, ...])

get_phonemes_ssml(ssml_inputs[, ...])

add_sp_if_no

get_input_ids

get_phonemes

add_sp_if_no(phonemes)[source]
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]][source]
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]][source]
get_phonemes(sentence: str, merge_sentences: bool = True, with_erhua: bool = True, robot: bool = False, print_info: bool = False) List[List[str]][source]
get_phonemes_ssml(ssml_inputs: list, merge_sentences: bool = True, with_erhua: bool = True, robot: bool = False, print_info: bool = False) List[List[str]][source]
class paddlespeech.t2s.frontend.zh_frontend.Polyphonic[source]

Bases: object

Methods

correct_pronunciation

correct_pronunciation(word, pinyin)[source]
paddlespeech.t2s.frontend.zh_frontend.insert_after_character(lst, item)[source]
paddlespeech.t2s.frontend.zh_frontend.intersperse(lst, item)[source]