router: TTS auf offiziellen Kikiri-Deutsche-Pfad umgestellt

Ersetzt die alte Implementierung (kokoro 0.7.16 + espeak.EspeakG2P)
durch den offiziellen Kikiri-Deutsche-Inferenzpfad:

- semidark/kokoro-Fork (0.9.4) mit lang_code='d'
- semidark/misaki-Fork (0.9.4) mit misaki.de.DEG2P
  (Text-Normalisierung + espeak-ng + Aussprache-Overrides)
- Verbessertes Chunking (Split an Satzgrenzen, 400 Zeichen)
- repo_id='hexgrad/Kokoro-82M' für KModel/KPipeline

Änderungen:
- router/tts_worker.py: KModel/KPipeline API aktualisiert,
  Monkey-Patching entfernt, Docstring aktualisiert
- deploy/install.sh: semidark-Forks installieren (misaki[de],
  kokoro --no-deps, spacy für misaki.en-Import)
- README.md: G2P-Pfad, Chunking, Python-Pakete, Python-3.13-Hinweis

Getestet: 43/43 lokale Tests, E2E auf Zielsystem (WAV/MP3,
LAN-Zugriff, parallele Qwen/TTS-Operation, Chat intakt).
This commit is contained in:
Mikei386
2026-08-19 13:09:29 +02:00
parent 6db10fbc3f
commit ff064685ce
3 changed files with 51 additions and 28 deletions
+12 -7
View File
@@ -80,7 +80,7 @@ if ! command -v espeak-ng >/dev/null 2>&1; then
apt-get install -y espeak-ng
fi
# Kokoro-Venv (CPU-only torch + kokoro + misaki + phonemizer + soundfile + lameenc)
# Kokoro-Venv (CPU-only torch + semidark/kokoro + semidark/misaki + soundfile + lameenc)
if [ ! -x "$KOKORO_VENV/bin/python" ]; then
echo "-- Erstelle Kokoro-Venv in $KOKORO_VENV"
mkdir -p "$KOKORO_VENV"
@@ -91,12 +91,17 @@ if [ ! -x "$KOKORO_VENV/bin/python" ]; then
--index-url https://download.pytorch.org/whl/cpu
echo "-- Installiere Kokoro-Abhängigkeiten"
"$KOKORO_VENV/bin/pip" install --quiet \
huggingface-hub loguru scipy transformers regex num2words \
phonemizer soundfile lameenc
# kokoro ohne [en]-Extra (vermeidet thinc 9.x, das kein Py3.13-Wheel hat);
# deutsche G2P läuft über espeak-ng (phonemizer), nicht über spacy.
"$KOKORO_VENV/bin/pip" install --quiet kokoro --no-deps
"$KOKORO_VENV/bin/pip" install --quiet misaki
huggingface-hub loguru transformers regex num2words \
soundfile lameenc
# Offizieller Kikiri-Deutsche-Pfad:
# - semidark/misaki-Fork (0.9.4) mit [de]-Extra (phonemizer-fork + espeakng-loader)
# - semidark/kokoro-Fork (0.9.4) mit --no-deps (vermeidet misaki[en] → spacy-curated-transformers)
# - spacy + num2words für misaki.en-Import (Englisch, nicht für deutschen Pfad)
"$KOKORO_VENV/bin/pip" install --quiet "spacy<4"
"$KOKORO_VENV/bin/pip" install --quiet \
"misaki[de] @ git+https://github.com/semidark/misaki.git"
"$KOKORO_VENV/bin/pip" install --quiet \
"kokoro @ git+https://github.com/semidark/kokoro.git" --no-deps
fi
# Kokoro-Modelle (kikiri-german-martin + kikiri-german-victoria, Apache 2.0)