Skip to content
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

Improve Language Support Documentation and Implementation #14

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Cfomodz
Copy link

@Cfomodz Cfomodz commented Jan 6, 2025

This PR improves the language support by updating documentation, language codes, and examples to match Kokoro-TTS v0.23.

Changes

Language Support Updates

  • Updated language codes to match Kokoro-TTS v0.23:
    • Japanese: "ja" → "ja-jp"
    • Korean: "ko" → "ko-kr"
    • Chinese: "cmn" → "zh-cn"

Documentation Improvements

  1. Added comprehensive language support documentation in:

    • Class docstrings
    • Method docstrings
    • README.md
    • Example files
  2. Added clear warnings and notes about CJK language limitations:

    • English letters not properly handled by tokenizers
    • Recommendations for handling English text in CJK languages

Example Improvements

  • Updated examples/languages.py with:
    • Better test sentences for each language
    • Error handling and feedback
    • Clear documentation and usage instructions
    • Language-specific comments and best practices

Code Quality

  • Added detailed docstrings to Kokoro class and methods
  • Improved error messages for language code validation
  • Added return type documentation

Testing

The changes can be tested by running the improved language example:

python examples/languages.py

Issues
Closes #6 - Support all 5 languages

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.

Support all 5 languages
1 participant