fix onnx am_ckpt from list to item in prtrained_mdoels.py

pull/2222/head
TianYuan 2 years ago
parent c6b25c05f4
commit 788a3062d0

@ -226,7 +226,7 @@ class TTSExecutor(BaseExecutor):
self.am_ckpt = os.path.abspath(am_ckpt) self.am_ckpt = os.path.abspath(am_ckpt)
self.am_stat = os.path.abspath(am_stat) self.am_stat = os.path.abspath(am_stat)
self.phones_dict = os.path.abspath(phones_dict) self.phones_dict = os.path.abspath(phones_dict)
self.am_res_path = os.path.dirname(os.path.abspath(self.am_config)) self.am_res_path = os.path.dirname(self.am_config)
# for speedyspeech # for speedyspeech
self.tones_dict = None self.tones_dict = None
@ -354,7 +354,7 @@ class TTSExecutor(BaseExecutor):
if use_pretrained_am: if use_pretrained_am:
self.am_res_path = self.task_resource.res_dir self.am_res_path = self.task_resource.res_dir
self.am_ckpt = os.path.join(self.am_res_path, self.am_ckpt = os.path.join(self.am_res_path,
self.task_resource.res_dict['ckpt'][0]) self.task_resource.res_dict['ckpt'])
# must have phones_dict in acoustic # must have phones_dict in acoustic
self.phones_dict = os.path.join( self.phones_dict = os.path.join(
self.am_res_path, self.task_resource.res_dict['phones_dict']) self.am_res_path, self.task_resource.res_dict['phones_dict'])
@ -362,9 +362,9 @@ class TTSExecutor(BaseExecutor):
logger.debug(self.am_res_path) logger.debug(self.am_res_path)
logger.debug(self.am_ckpt) logger.debug(self.am_ckpt)
else: else:
self.am_ckpt = os.path.abspath(am_ckpt[0]) self.am_ckpt = os.path.abspath(am_ckpt)
self.phones_dict = os.path.abspath(phones_dict) self.phones_dict = os.path.abspath(phones_dict)
self.am_res_path = os.path.dirname(os.path.abspath(self.am_ckpt)) self.am_res_path = os.path.dirname(self.am_ckpt)
self.am_fs = fs self.am_fs = fs
# for speedyspeech # for speedyspeech

@ -1095,7 +1095,8 @@ tts_onnx_pretrained_models = {
'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/speedyspeech/speedyspeech_csmsc_onnx_0.2.0.zip', 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/speedyspeech/speedyspeech_csmsc_onnx_0.2.0.zip',
'md5': 'md5':
'3e9c45af9ef70675fc1968ed5074fc88', '3e9c45af9ef70675fc1968ed5074fc88',
'ckpt': ['speedyspeech_csmsc.onnx'], 'ckpt':
'speedyspeech_csmsc.onnx',
'phones_dict': 'phones_dict':
'phone_id_map.txt', 'phone_id_map.txt',
'tones_dict': 'tones_dict':
@ -1111,7 +1112,8 @@ tts_onnx_pretrained_models = {
'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_csmsc_onnx_0.2.0.zip', 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_csmsc_onnx_0.2.0.zip',
'md5': 'md5':
'fd3ad38d83273ad51f0ea4f4abf3ab4e', 'fd3ad38d83273ad51f0ea4f4abf3ab4e',
'ckpt': ['fastspeech2_csmsc.onnx'], 'ckpt':
'fastspeech2_csmsc.onnx',
'phones_dict': 'phones_dict':
'phone_id_map.txt', 'phone_id_map.txt',
'sample_rate': 'sample_rate':
@ -1124,7 +1126,8 @@ tts_onnx_pretrained_models = {
'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_ljspeech_onnx_1.1.0.zip', 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_ljspeech_onnx_1.1.0.zip',
'md5': 'md5':
'00754307636a48c972a5f3e65cda3d18', '00754307636a48c972a5f3e65cda3d18',
'ckpt': ['fastspeech2_ljspeech.onnx'], 'ckpt':
'fastspeech2_ljspeech.onnx',
'phones_dict': 'phones_dict':
'phone_id_map.txt', 'phone_id_map.txt',
'sample_rate': 'sample_rate':
@ -1137,7 +1140,8 @@ tts_onnx_pretrained_models = {
'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_aishell3_onnx_1.1.0.zip', 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_aishell3_onnx_1.1.0.zip',
'md5': 'md5':
'a1d6ee21de897ce394f5469e2bb4df0d', 'a1d6ee21de897ce394f5469e2bb4df0d',
'ckpt': ['fastspeech2_aishell3.onnx'], 'ckpt':
'fastspeech2_aishell3.onnx',
'phones_dict': 'phones_dict':
'phone_id_map.txt', 'phone_id_map.txt',
'speaker_dict': 'speaker_dict':
@ -1152,7 +1156,8 @@ tts_onnx_pretrained_models = {
'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_vctk_onnx_1.1.0.zip', 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_vctk_onnx_1.1.0.zip',
'md5': 'md5':
'd9c3a9b02204a2070504dd99f5f959bf', 'd9c3a9b02204a2070504dd99f5f959bf',
'ckpt': ['fastspeech2_vctk.onnx'], 'ckpt':
'fastspeech2_vctk.onnx',
'phones_dict': 'phones_dict':
'phone_id_map.txt', 'phone_id_map.txt',
'speaker_dict': 'speaker_dict':

Loading…
Cancel
Save