Skip to content

feat(text): add Chinese punctuation-based sentence splitting for bett… #321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2025

Conversation

jiaohuix
Copy link
Contributor

This PR introduces the following improvements:

  • Adds support for sentence splitting based on Chinese punctuation marks (,。!?;) in text_processor.py.
  • The code now automatically detects Chinese text and splits sentences at appropriate punctuation, resulting in more natural pauses and improved fluency in Chinese TTS synthesis.
  • The original English sentence splitting logic is preserved and unaffected.
  • Tested locally: Chinese sentences like "你好,我能帮你什么吗" are now split and synthesized with natural prosody.

This enhancement will greatly benefit Chinese users by making synthesized speech sound more natural.
Thank you for considering this contribution!

@fireblade2534 fireblade2534 merged commit 543cbec into remsky:master May 28, 2025
1 check passed
ddillon183 pushed a commit to ddillon183/kokoro-fastapi-real that referenced this pull request Jun 12, 2025
feat(text): add Chinese punctuation-based sentence splitting for bett…
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.

2 participants