feat: Add XTTS v2 support, refactor Docker/GPU infra, and improve Piper engine
- Add XTTS v2 configuration to .env.example - Refactor Dockerfile to multi-stage build with CUDA 12.1 support - Update Makefile with Kokoro and XTTS test environment targets - Refactor Piper engine (app/engines/piper.py) to use python module execution - Add comprehensive documentation for Kokoro and XTTS plans - Add helper scripts and patches for build process
This commit is contained in:
27
patches/fix-misaki-espeak.sh
Normal file
27
patches/fix-misaki-espeak.sh
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# Patch misaki/espeak.py to work with newer phonemizer versions
|
||||
# The newer phonemizer API doesn't have set_data_path() method
|
||||
|
||||
MISAKI_FILE="/opt/venv/lib/python3.11/site-packages/misaki/espeak.py"
|
||||
|
||||
if [ -f "$MISAKI_FILE" ]; then
|
||||
echo "Patching misaki/espeak.py for phonemizer compatibility..."
|
||||
|
||||
# Comment out the problematic line
|
||||
sed -i 's/^EspeakWrapper\.set_data_path(espeakng_loader\.get_data_path())/# EspeakWrapper.set_data_path(espeakng_loader.get_data_path()) # Patched: not needed with current phonemizer/' "$MISAKI_FILE"
|
||||
|
||||
echo "Patch applied successfully!"
|
||||
else
|
||||
echo "Warning: misaki/espeak.py not found at $MISAKI_FILE"
|
||||
fi
|
||||
|
||||
# Download SpaCy model for Kokoro text processing
|
||||
echo "Downloading SpaCy en_core_web_sm model for Kokoro..."
|
||||
python3.11 -m spacy download en_core_web_sm
|
||||
echo "SpaCy model downloaded successfully!"
|
||||
|
||||
# Create symlink for espeak-ng-data to fix hardcoded path issue
|
||||
echo "Creating espeak-ng-data symlink..."
|
||||
mkdir -p /home/runner/work/espeakng-loader/espeakng-loader/espeak-ng/_dynamic/share/
|
||||
ln -sf /usr/lib/x86_64-linux-gnu/espeak-ng-data /home/runner/work/espeakng-loader/espeakng-loader/espeak-ng/_dynamic/share/espeak-ng-data
|
||||
echo "Symlink created successfully!"
|
||||
Reference in New Issue
Block a user