增加文件编码读取 (#3606)

Fixed #3605
pull/3711/head
Color_yr 10 months ago committed by GitHub
parent 1b8ca706d6
commit 39ba32fafb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -154,7 +154,7 @@ class TTSServerExecutor(TTSExecutor):
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}")

Loading…
Cancel
Save