From 5aeb544c90c7544f0e02e9e7d6b1a7a16b3f3f03 Mon Sep 17 00:00:00 2001 From: Cosmo Clara Date: Fri, 18 Oct 2024 01:05:07 +0800 Subject: [PATCH] Update TextPreprocessor.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除punctuation中的“ ”,以便于按英文句号切分 --- GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py b/GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py index b90bd929..207913d0 100644 --- a/GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py +++ b/GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py @@ -20,7 +20,7 @@ from tools.i18n.i18n import I18nAuto, scan_language_list language=os.environ.get("language","Auto") language=sys.argv[-1] if sys.argv[-1] in scan_language_list() else language i18n = I18nAuto(language=language) -punctuation = set(['!', '?', '…', ',', '.', '-'," "]) +punctuation = set(['!', '?', '…', ',', '.', '-']) def get_first(text:str) -> str: pattern = "[" + "".join(re.escape(sep) for sep in splits) + "]"