mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-04-05 19:41:56 +08:00
add encoding (#1730)
This commit is contained in:
parent
98cc47699c
commit
6d82050b9c
@ -127,14 +127,14 @@ def get_dict():
|
||||
|
||||
def read_dict():
|
||||
polyphonic_dict = {}
|
||||
with open(PP_DICT_PATH) as f:
|
||||
with open(PP_DICT_PATH,encoding="utf-8") as f:
|
||||
line = f.readline()
|
||||
while line:
|
||||
key, value_str = line.split(':')
|
||||
value = eval(value_str.strip())
|
||||
polyphonic_dict[key.strip()] = value
|
||||
line = f.readline()
|
||||
with open(PP_FIX_DICT_PATH) as f:
|
||||
with open(PP_FIX_DICT_PATH,encoding="utf-8") as f:
|
||||
line = f.readline()
|
||||
while line:
|
||||
key, value_str = line.split(':')
|
||||
@ -151,4 +151,4 @@ def correct_pronunciation(word,word_pinyins):
|
||||
return word_pinyins
|
||||
|
||||
|
||||
pp_dict = get_dict()
|
||||
pp_dict = get_dict()
|
||||
|
Loading…
x
Reference in New Issue
Block a user