Merge pull request #658 from KamioRinn/Fix-KO

修正LangSegment识别为韩文
This commit is contained in:
RVC-Boss 2024-03-04 00:44:47 +08:00 committed by GitHub
commit b75b5dcf6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -258,11 +258,15 @@ def get_phones_and_bert(text,language):
elif language in {"zh", "ja","auto"}:
textlist=[]
langlist=[]
LangSegment.setfilters(["zh","ja","en"])
LangSegment.setfilters(["zh","ja","en","ko"])
if language == "auto":
for tmp in LangSegment.getTexts(text):
langlist.append(tmp["lang"])
textlist.append(tmp["text"])
if tmp["lang"] == "ko":
langlist.append("zh")
textlist.append(tmp["text"])
else:
langlist.append(tmp["lang"])
textlist.append(tmp["text"])
else:
for tmp in LangSegment.getTexts(text):
if tmp["lang"] == "en":