r9y9 / nnmnkwii

Library to build speech synthesis systems designed for easy and fast prototyping.

Home Page:https://r9y9.github.io/nnmnkwii/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UnicodeDecoreError in nnmnkwii.io.hts.load on Windows

oatsu-gh opened this issue · comments

commented

Loading HTS label file (utf-8) on Windows 10, UnicodeDecodeError was raised.

  File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\nnmnkwii\io\hts.py", line 325, in load
    return labels.load(path, lines)
  File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\site-packages\nnmnkwii\io\hts.py", line 199, in load
    lines = f.readlines()
UnicodeDecodeError: 'cp932' codec can't decode byte 0x86 in position 16: illegal multibyte sequence

I wish that nnmnkwii.io.hts.load supports selecting character encoding, with argument encoding='utf-8'.

Hi, thanks for raising the issue. I am okay to add a keyword argument as encoding="utf-8". However, I guess the easiest solution is to set the environmental variable PYTHONIOENCODING=utf-8.

commented

Thank you, I'll try it.