Skip to content

fix(tts): normalize Chinese punctuation before synthesis - #443

Open
Ben Younes (ousamabenyounes) wants to merge 1 commit into
microsoft:mainfrom
ousamabenyounes:fix/issue-425
Open

Ben Younes (ousamabenyounes) wants to merge 1 commit into
microsoft:mainfrom
ousamabenyounes:fix/issue-425

Conversation

@ousamabenyounes

Copy link
Copy Markdown

Normalize full-width Chinese punctuation to the ASCII punctuation recommended by the model before tokenization, avoiding a documented source of unstable Chinese speech synthesis.

Test verification (RED → GREEN)

With the fix reverted, the new test fails (RED):

test_normalizes_chinese_punctuation_for_synthesis (test_text_normalization.TextNormalizationTest.test_normalizes_chinese_punctuation_for_synthesis) ... FAIL

======================================================================
FAIL: test_normalizes_chinese_punctuation_for_synthesis (test_text_normalization.TextNormalizationTest.test_normalizes_chinese_punctuation_for_synthesis)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ousama/contribute-work/microsoft__VibeVoice/tests/test_text_normalization.py", line 78, in test_normalizes_chinese_punctuation_for_synthesis
    self.assertEqual(
AssertionError: Lists differ: [(0, ' 你好,世界。她问:“今天好吗?”我说:‘很好!’')] != [(0, ' 你好,世界.她问:"今天好吗?"我说:\'很好!\'')]

First differing element 0:
(0, ' 你好,世界。她问:“今天好吗?”我说:‘很好!’')
(0, ' 你好,世界.她问:"今天好吗?"我说:\'很好!\'')

- [(0, ' 你好,世界。她问:“今天好吗?”我说:‘很好!’')]
+ [(0, ' 你好,世界.她问:"今天好吗?"我说:\'很好!\'')]

----------------------------------------------------------------------
Ran 1 test in 0.011s

FAILED (failures=1)

With the fix applied, the test passes (GREEN):

test_normalizes_chinese_punctuation_for_synthesis (test_text_normalization.TextNormalizationTest.test_normalizes_chinese_punctuation_for_synthesis) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.002s

OK

Full local suite

Command: python3 -m unittest discover -s tests -v && python3 -m compileall -q vibevoice demo finetuning-asr vllm_plugin

test_normalizes_chinese_punctuation_for_synthesis (test_text_normalization.TextNormalizationTest.test_normalizes_chinese_punctuation_for_synthesis) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.011s

OK

Fix #425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

中国人声音

1 participant