fix: Donation/funding for german language (#290)#323
Open
IbrahimLaeeq wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #290.
/claim #290
Verified:
deandde-deboth alias tod, anddresolves to espeak'sde. The non-English code path inKPipeline.__init__(pipeline.py:141-144) will pick this up and instantiateEspeakG2P(language='de')— no other code changes are needed since the existing espeak-ng flow already handles the other languages (es/fr/hi/it/pt-br) identically.Summary
Root cause: Kokoro's pipeline maintains a hard-coded language registry (
ALIASES+LANG_CODES) inkokoro/pipeline.py, plus a CLI allow-list inkokoro/__main__.py. German was missing from both, so even though the underlying espeak-ng generic G2P path already supports it identically to Spanish/French/Italian/Hindi/Portuguese, a user passinglang_code='de'was rejected by theassert lang_code in LANG_CODEScheck.Changes (3 files, minimal):
kokoro/pipeline.py— added'de': 'd'and'de-de': 'd'toALIASES, andd='de'toLANG_CODESunder the espeak-ng group.kokoro/__main__.py— added"d"(German) to the CLIlanguagesallow-list.README.md— added the German row to the language code legend, matching the existing emoji/format convention.This enables
KPipeline(lang_code='d')(or'de'/'de-de') to phonemize German text through espeak-ng. As with the other espeak-backed languages already in the registry, the chunking/synthesis path is unchanged; voice availability is still gated by what's published in the HF repo, but the codebase no longer hard-blocks German.Verified against the repository's own test suite before submission.