Skip to content

feat: add German language support via espeak-ng (lang_code='d'/'de')#346

Open
Haydar061 wants to merge 1 commit into
hexgrad:mainfrom
Haydar061:feat/german-language-support
Open

feat: add German language support via espeak-ng (lang_code='d'/'de')#346
Haydar061 wants to merge 1 commit into
hexgrad:mainfrom
Haydar061:feat/german-language-support

Conversation

@Haydar061

Copy link
Copy Markdown

Summary

Adds German language support using the existing EspeakG2P pipeline, consistent with how Spanish, French, Italian, Hindi, and Portuguese are already supported.

Changes

  • kokoro/pipeline.py

    • Add 'de': 'd' alias to ALIASES
    • Add 'd': 'de' entry to LANG_CODES (under # espeak-ng)
    • Remove outdated warning that claimed "chunking logic not yet implemented" — the __call__ method already handles sentence-boundary chunking for all non-English languages
  • kokoro/__main__.py

    • Add 'd' (German) to the CLI --language choices

Usage

from kokoro import KPipeline

pipeline = KPipeline(lang_code='d')  # or lang_code='de'
for result in pipeline('Guten Morgen, wie geht es Ihnen?', voice='df_...'):
    # result.audio is the generated audio
    ...
python3 -m kokoro -l d --voice df_... -t "Guten Morgen" -o output.wav

Notes

  • Uses espeak-ng G2P, same as all other non-English/non-CJK languages
  • Long texts are automatically split on sentence boundaries (.!?) via the existing chunking logic in __call__
  • Requires espeak-ng to be installed (apt-get install espeak-ng)

Closes #290

Add lang_code='d' (alias 'de') for German text-to-speech using the
existing EspeakG2P pipeline with sentence-boundary chunking.

- pipeline.py: add 'de' -> 'd' alias and 'd' -> 'de' LANG_CODE
- __main__.py: expose 'd' in the CLI --language choices
- Remove outdated warning that claimed chunking was not implemented;
  the __call__ method already handles non-English chunking

Usage:
    pipeline = KPipeline(lang_code='d')  # or lang_code='de'
    for result in pipeline('Guten Morgen', voice='...'): ...

    python3 -m kokoro -l d --voice df_... -o out.wav

Closes hexgrad#290
@Haydar061

Copy link
Copy Markdown
Author

Hey, just wanted to check in on this PR! Happy to make any changes if needed. Have a great day!

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.

Donation/funding for german language

1 participant