Add German language support via espeak-ng (lang_code 'de') — addresses #290#340
Open
chiddekel wants to merge 1 commit into
Open
Add German language support via espeak-ng (lang_code 'de') — addresses #290#340chiddekel wants to merge 1 commit into
chiddekel wants to merge 1 commit into
Conversation
Routes German through the existing espeak.EspeakG2P path already used for
Spanish, French, Italian, Portuguese and Hindi -- German was simply
missing from ALIASES/LANG_CODES. No new code branch and no new
dependency: espeak-ng is already required (it backs en G2P fallback and
the other espeak languages) and ships German out of the box.
Usage:
KPipeline(lang_code='de') # or 'd'
python3 -m kokoro -l d --text 'Guten Tag'
Verified: 'Guten Tag, wie geht es dir? Kuenstliche Intelligenz ist
faszinierend.' phonemizes to
['gutn tak, vi get s dir? kynstl ntlgnts st fastsinirnt.'] (IPA).
Scope note: this enables German G2P + synthesis via the shared multilingual
checkpoint, same tier/caveats as the other espeak languages (chunking not
yet implemented for non-English; intonation quality varies as the base
model was not fine-tuned on German). It is a working out-of-the-box path
toward hexgrad#290 while a dedicated misaki[de] / German fine-tune lands.
Addresses hexgrad#290
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.
German language support via espeak-ng (
lang_code='de'/'d')Closes the practical gap behind #290: Kokoro had no German entry in its language table, even though it already drives Spanish, French, Italian, Portuguese and Hindi through
espeak.EspeakG2P, andespeak-ngships German out of the box. German just needed to join that family.This is the pragmatic path @kneo described in #290 — "provided the correct phonemes, existing models may just work":
espeak-ngproduces correct German IPA, and the multilingual checkpoint consumes IPA.Change (3 lines, no new dependency)
The existing
elsebranch then constructsEspeakG2P(language='de')automatically — no new code branch.espeak-ngis already required (it backs the English G2P fallback and every other espeak language), so there is nothing new to install.Usage
python3 -m kokoro -l d --text "Guten Tag, wie geht es dir?"Verified
Relationship to #317
#317 routes German to
from misaki import de; de.DEG2P(), butmisaki[de]does not exist on PyPI, so that path raisesImportErrorfor every user today. This PR uses the already-working espeak path instead, so German works immediately.Scope (honest)
Same tier and caveats as the other espeak languages: chunking isn't implemented for non-English (split long text on
\n), and prosody quality varies because the base checkpoint wasn't fine-tuned on German. This is a working out-of-the-box German path now, complementary to a future dedicatedmisaki[de]/ German fine-tune (the larger goal the #290 bounty funds).Addresses #290