Adjust ja clean text

This commit is contained in:
KamioRinn 2024-02-17 16:04:06 +08:00
parent f6c9803909
commit c70a609a31

View File

@ -248,6 +248,10 @@ def clean_text_inf(text, language):
formattext = ""
language = language.replace("all_","")
for tmp in LangSegment.getTexts(text):
if language == "ja":
if tmp["lang"] == language or tmp["lang"] == "zh":
formattext += tmp["text"] + " "
continue
if tmp["lang"] == language:
formattext += tmp["text"] + " "
while " " in formattext:
@ -279,8 +283,6 @@ def nonen_clean_text_inf(text, language):
for tmp in LangSegment.getTexts(text):
langlist.append(tmp["lang"])
textlist.append(tmp["text"])
print(textlist)
print(langlist)
phones_list = []
word2ph_list = []
norm_text_list = []