From 8e2aee7b5e77a0a067aab199b9995c6b0d76f44a Mon Sep 17 00:00:00 2001 From: "david.95" Date: Fri, 9 Sep 2022 14:12:46 +0800 Subject: [PATCH] fix tone bug about 3 chinese chars have two tone5, test=tts --- paddlespeech/t2s/frontend/tone_sandhi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddlespeech/t2s/frontend/tone_sandhi.py b/paddlespeech/t2s/frontend/tone_sandhi.py index a46edf878..d8ea1a533 100644 --- a/paddlespeech/t2s/frontend/tone_sandhi.py +++ b/paddlespeech/t2s/frontend/tone_sandhi.py @@ -157,7 +157,7 @@ class ToneSandhi(): def _split_word(self, word: str) -> List[str]: if len(word) == 3 and word[ - -1:] == '子': # three chars, like 老头子,the second char tone should not be 5 + -1:] == '子': # three chars, like 老头子,the second char tone should not be 5 return [word] word_list = jieba.cut_for_search(word) word_list = sorted(word_list, key=lambda i: len(i), reverse=False)