paddlespeech.t2s.exps.ernie_sat.utils module

paddlespeech.t2s.exps.ernie_sat.utils.eval_durs(phns, target_lang: str = 'zh', fs: int = 24000, n_shift: int = 300)[source]
paddlespeech.t2s.exps.ernie_sat.utils.get_dict(dictfile: str)[source]
paddlespeech.t2s.exps.ernie_sat.utils.get_dur_adj_factor(orig_dur: List[int], pred_dur: List[int], phns: List[str])[source]
paddlespeech.t2s.exps.ernie_sat.utils.get_span_bdy(mfa_start: List[float], mfa_end: List[float], span_to_repl: List[List[int]])[source]
paddlespeech.t2s.exps.ernie_sat.utils.get_tmp_name(text: str)[source]
paddlespeech.t2s.exps.ernie_sat.utils.get_voc_out(mel)[source]
paddlespeech.t2s.exps.ernie_sat.utils.is_chinese(ch)[source]
paddlespeech.t2s.exps.ernie_sat.utils.load_num_sequence_text(path: Union[Path, str], loader_type: str = 'csv_int') Dict[str, List[Union[float, int]]][source]

Read a text file indicating sequences of number

Examples:

key1 1 2 3 key2 34 5 6

>>> d = load_num_sequence_text('text')
>>> np.testing.assert_array_equal(d["key1"], np.array([1, 2, 3]))
paddlespeech.t2s.exps.ernie_sat.utils.read_2col_text(path: Union[Path, str]) Dict[str, str][source]

Read a text file having 2 column as dict object.

Examples:
wav.scp:

key1 /some/path/a.wav key2 /some/path/b.wav

>>> read_2col_text('wav.scp')
{'key1': '/some/path/a.wav', 'key2': '/some/path/b.wav'}
paddlespeech.t2s.exps.ernie_sat.utils.str2md5(string)[source]