Spaces:
Running
on
Zero
Running
on
Zero
mandarin
Browse files
diffrhythm/g2p/g2p/mandarin.py
CHANGED
@@ -186,12 +186,13 @@ with open(
|
|
186 |
r"./diffrhythm/g2p/sources/chinese_lexicon.txt", "r", encoding="utf-8"
|
187 |
) as fread:
|
188 |
txt_list = fread.readlines()
|
189 |
-
for txt in txt_list:
|
190 |
try:
|
191 |
word, pinyin = txt.strip().split("\t")
|
|
|
192 |
except:
|
193 |
print(txt.strip())
|
194 |
-
|
195 |
fread.close()
|
196 |
|
197 |
pinyin_2_bopomofo_dict = {}
|
|
|
186 |
r"./diffrhythm/g2p/sources/chinese_lexicon.txt", "r", encoding="utf-8"
|
187 |
) as fread:
|
188 |
txt_list = fread.readlines()
|
189 |
+
for i, txt in enumerate(txt_list):
|
190 |
try:
|
191 |
word, pinyin = txt.strip().split("\t")
|
192 |
+
word_pinyin_dict[word] = pinyin
|
193 |
except:
|
194 |
print(txt.strip())
|
195 |
+
print(f"************** {i} ****************")
|
196 |
fread.close()
|
197 |
|
198 |
pinyin_2_bopomofo_dict = {}
|