Merge pull request #509 from KamioRinn/Adjust-ja-clean-text

Adjust ja clean text
This commit is contained in:
RVC-Boss 2024-02-17 16:49:56 +08:00 committed by GitHub
commit 99c10f45fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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 = []