36 lines
920 B
Bash
Executable File
36 lines
920 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Quick start script for Morshu TTS Server
|
|
|
|
echo "🗣️ Starting Morshu TTS Server..."
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
cd "$SCRIPT_DIR"
|
|
|
|
# Check if python3 is available
|
|
if ! command -v python3 &> /dev/null; then
|
|
echo "❌ Error: python3 is not installed"
|
|
exit 1
|
|
fi
|
|
|
|
# Check required Python packages
|
|
for pkg in pydub nltk g2p_en numpy; do
|
|
if ! python3 -c "import $pkg" 2>/dev/null; then
|
|
echo "❌ Error: Python package '$pkg' is not installed"
|
|
echo "Install it with: pip install $pkg"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
# Check if the morshu wav file exists
|
|
if [ ! -f "$SCRIPT_DIR/../morshutalk_morshu.wav" ]; then
|
|
echo "❌ Error: morshutalk_morshu.wav not found in parent directory"
|
|
exit 1
|
|
fi
|
|
|
|
# Start the server
|
|
export PORT="${PORT:-3002}"
|
|
echo "✅ Starting server on port $PORT..."
|
|
echo "🗣️ Using MorshuTalk engine"
|
|
exec python3 "$SCRIPT_DIR/server.py"
|