ing0 commited on
Commit
060348d
·
1 Parent(s): f5714bb
Files changed (1) hide show
  1. diffrhythm/g2p/g2p/mandarin.py +3 -2
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
- word_pinyin_dict[word] = pinyin
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 = {}