去除不必要的过滤器让前端处理部分正常工作

去除不必要的过滤器让前端处理部分得以在正常(非fast)infer下正常工作
This commit is contained in:
Cosmo Clara 2024-12-11 02:44:37 +08:00 committed by GitHub
parent 604823b402
commit f6d0165843
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -307,12 +307,7 @@ from text import chinese
def get_phones_and_bert(text,language,version,final=False):
if language in {"en", "all_zh", "all_ja", "all_ko", "all_yue"}:
language = language.replace("all_","")
if language == "en":
LangSegment.setfilters(["en"])
formattext = " ".join(tmp["text"] for tmp in LangSegment.getTexts(text))
else:
# 因无法区别中日韩文汉字,以用户输入为准
formattext = text
formattext = text
while " " in formattext:
formattext = formattext.replace(" ", " ")
if language == "zh":