Skip to content

Commit

Permalink
增加文件编码读取 (#3606)
Browse files Browse the repository at this point in the history
Fixed #3605
  • Loading branch information
Coloryr committed Jan 16, 2024
1 parent 1b8ca70 commit 39ba32f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddlespeech/server/engine/tts/online/onnx/tts_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def _init_from_path(
self.voc_sess = get_sess(self.voc_ckpt, voc_sess_conf)
logger.debug("Create voc sess successfully.")

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

0 comments on commit 39ba32f

Please sign in to comment.