netease-youdao / EmotiVoice

EmotiVoice 😊: a Multi-Voice and Prompt-Controlled TTS Engine
Apache License 2.0
6.9k stars 577 forks source link

UnicodeDecodeError #45

Closed bowu1004 closed 8 months ago

bowu1004 commented 8 months ago

我做inference推理使用,一直遇到这个问题:

config.py", line 40, in Config emotions = [t.strip() for t in f.readlines()] UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 2: illegal multibyte sequence

请问可能的原因和解决办法是什么?Thx.

syq163 commented 8 months ago

Please update the latest code and give a try again.

bowu1004 commented 8 months ago

Please update the latest code and give a try again.

Thanks for your suggestion. I've pulled down the latest code but the error restained. I made the following change, and the error gone:

with open('XXXXX.txt','r',encoding='UTF-8') as f:

.