Files
novafarma/scripts/generate_all_languages.sh

68 lines
2.0 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# MASTER SCRIPT - Generate ALL 4 languages tonight
# Run this ONE command and everything happens automatically!
echo "🌍 MULTI-LANGUAGE GENERATION - TONIGHT PRODUCTION"
echo "================================================"
echo ""
echo "Languages: English, German, Italian, Chinese"
echo "Files: 48 voiceovers (12 per language)"
echo ""
# Check if DeepL key is set
if [ -z "$DEEPL_API_KEY" ]; then
echo "⚠️ Warning: DEEPL_API_KEY not set"
echo "Set it with: export DEEPL_API_KEY='your-key-here'"
echo ""
fi
# Step 1: Extract Slovenian (if not done)
echo "📝 Step 1: Extracting Slovenian text..."
if [ ! -f "assets/localization/sl-SI.json" ]; then
python3 scripts/extract_slovenian.py
echo "✅ Slovenian extracted"
else
echo "✅ Slovenian already exists"
fi
echo ""
# Step 2: Translate to 4 languages
echo "🔄 Step 2: Translating to 4 languages..."
python3 scripts/translate_all.py
echo "✅ Translations complete"
echo ""
# Step 3: Generate voiceovers
echo "🎤 Step 3: Generating voiceovers..."
echo " 🇬🇧 Generating English..."
./ai_voice_gen/generate_prologue_english.sh > /dev/null 2>&1
echo " ✅ English: 12 files"
echo " 🇩🇪 Generating German..."
./ai_voice_gen/generate_prologue_german.sh > /dev/null 2>&1
echo " ✅ German: 12 files"
echo " 🇮🇹 Generating Italian..."
./ai_voice_gen/generate_prologue_italian.sh > /dev/null 2>&1
echo " ✅ Italian: 12 files"
echo " 🇨🇳 Generating Chinese..."
./ai_voice_gen/generate_prologue_chinese.sh > /dev/null 2>&1
echo " ✅ Chinese: 12 files"
echo ""
echo "🎉 ALL LANGUAGES COMPLETE!"
echo ""
echo "📊 Summary:"
echo " - 5 languages total (including Slovenian)"
echo " - 60 voiceover files (12 × 5)"
echo " - 5 JSON localization files"
echo ""
echo "📁 Files created:"
ls -lh assets/localization/*.json | awk '{print " ", $9, "(" $5 ")"}'
echo ""
du -sh assets/audio\ 🔴/voiceover/prologue_* | awk '{print " ", $2, "(" $1 ")"}'
echo ""
echo "✅ Ready to commit & push!"