From d88ceef7bc550a5fb377af551b75f7b2d82eab5f Mon Sep 17 00:00:00 2001 From: JiehangXie Date: Tue, 4 Jan 2022 21:22:37 +0800 Subject: [PATCH] Fix punctuation bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复顿号和英文冒号停顿和分句的问题 --- paddlespeech/t2s/frontend/zh_normalization/text_normlization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddlespeech/t2s/frontend/zh_normalization/text_normlization.py b/paddlespeech/t2s/frontend/zh_normalization/text_normlization.py index 2a976d03..9bdee638 100644 --- a/paddlespeech/t2s/frontend/zh_normalization/text_normlization.py +++ b/paddlespeech/t2s/frontend/zh_normalization/text_normlization.py @@ -51,7 +51,7 @@ from .quantifier import replace_temperature class TextNormalizer(): def __init__(self): - self.SENTENCE_SPLITOR = re.compile(r'([::、,;。?!,;?!][”’]?)') + self.SENTENCE_SPLITOR = re.compile(r'([:、,;。?!,;?:!][”’]?)') def _split(self, text: str, lang="zh") -> List[str]: """Split long text into sentences with sentence-splitting punctuations.