diff --git a/paddlespeech/cli/tts/infer.py b/paddlespeech/cli/tts/infer.py index c8d5447e..86ff4fe0 100644 --- a/paddlespeech/cli/tts/infer.py +++ b/paddlespeech/cli/tts/infer.py @@ -226,7 +226,7 @@ class TTSExecutor(BaseExecutor): self.am_ckpt = os.path.abspath(am_ckpt) self.am_stat = os.path.abspath(am_stat) 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 self.tones_dict = None @@ -354,7 +354,7 @@ class TTSExecutor(BaseExecutor): if use_pretrained_am: self.am_res_path = self.task_resource.res_dir 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 self.phones_dict = os.path.join( 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_ckpt) 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.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 # for speedyspeech diff --git a/paddlespeech/resource/pretrained_models.py b/paddlespeech/resource/pretrained_models.py index 43d63925..bfe2bc7e 100644 --- a/paddlespeech/resource/pretrained_models.py +++ b/paddlespeech/resource/pretrained_models.py @@ -1095,7 +1095,8 @@ tts_onnx_pretrained_models = { 'https://paddlespeech.bj.bcebos.com/Parakeet/released_models/speedyspeech/speedyspeech_csmsc_onnx_0.2.0.zip', 'md5': '3e9c45af9ef70675fc1968ed5074fc88', - 'ckpt': ['speedyspeech_csmsc.onnx'], + 'ckpt': + 'speedyspeech_csmsc.onnx', 'phones_dict': 'phone_id_map.txt', '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', 'md5': 'fd3ad38d83273ad51f0ea4f4abf3ab4e', - 'ckpt': ['fastspeech2_csmsc.onnx'], + 'ckpt': + 'fastspeech2_csmsc.onnx', 'phones_dict': 'phone_id_map.txt', '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', 'md5': '00754307636a48c972a5f3e65cda3d18', - 'ckpt': ['fastspeech2_ljspeech.onnx'], + 'ckpt': + 'fastspeech2_ljspeech.onnx', 'phones_dict': 'phone_id_map.txt', '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', 'md5': 'a1d6ee21de897ce394f5469e2bb4df0d', - 'ckpt': ['fastspeech2_aishell3.onnx'], + 'ckpt': + 'fastspeech2_aishell3.onnx', 'phones_dict': 'phone_id_map.txt', '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', 'md5': 'd9c3a9b02204a2070504dd99f5f959bf', - 'ckpt': ['fastspeech2_vctk.onnx'], + 'ckpt': + 'fastspeech2_vctk.onnx', 'phones_dict': 'phone_id_map.txt', 'speaker_dict':