diff --git a/paddlespeech/t2s/frontend/tone_sandhi.py b/paddlespeech/t2s/frontend/tone_sandhi.py index ec1b61302..bc021d5aa 100644 --- a/paddlespeech/t2s/frontend/tone_sandhi.py +++ b/paddlespeech/t2s/frontend/tone_sandhi.py @@ -268,7 +268,7 @@ class ToneSandhi(): for (word, pos) in seg: orig_finals = lazy_pinyin( word, neutral_tone_with_five=True, style=Style.FINALS_TONE3) - # after pypinyin==0.41.0, 嗯 will be processed as "", so we need to change it to "n2" + # after pypinyin==0.44.0, '嗯' need to be n2, cause the initial and final consonants cannot be empty at the same time en_index = [index for index, c in enumerate(word) if c == "嗯"] for i in en_index: orig_finals[i] = "n2"