From f73725800c60dc38e4136d69ffdb23cf6bfb1de6 Mon Sep 17 00:00:00 2001 From: shuishu <990941859@qq.com> Date: Wed, 24 May 2023 11:06:26 +0800 Subject: [PATCH] Update phonecode.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 固话的正则 错误修改 参考https://github.com/speechio/chinese_text_normalization/blob/master/python/cn_tn.py 固化的正则为: pattern = re.compile(r"\D((0(10|2[1-3]|[3-9]\d{2})-?)?[1-9]\d{6,7})\D") --- paddlespeech/t2s/frontend/zh_normalization/phonecode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddlespeech/t2s/frontend/zh_normalization/phonecode.py b/paddlespeech/t2s/frontend/zh_normalization/phonecode.py index 06b5d41b8..518351126 100644 --- a/paddlespeech/t2s/frontend/zh_normalization/phonecode.py +++ b/paddlespeech/t2s/frontend/zh_normalization/phonecode.py @@ -24,7 +24,7 @@ from .num import verbalize_digit RE_MOBILE_PHONE = re.compile( r"(?