Skip to content

Commit 39ba32f

Browse files
authored
增加文件编码读取 (#3606)
Fixed #3605
1 parent 1b8ca70 commit 39ba32f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddlespeech/server/engine/tts/online/onnx/tts_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def _init_from_path(
154154
self.voc_sess = get_sess(self.voc_ckpt, voc_sess_conf)
155155
logger.debug("Create voc sess successfully.")
156156

157-
with open(self.phones_dict, "r") as f:
157+
with open(self.phones_dict, "r", encoding='utf-8') as f:
158158
phn_id = [line.strip().split() for line in f.readlines()]
159159
self.vocab_size = len(phn_id)
160160
logger.debug(f"vocab_size: {self.vocab_size}")

0 commit comments

Comments
 (0)