morshu-server: add proper start script and systemd service
This commit is contained in:
@@ -1,4 +1,33 @@
|
||||
#!/bin/bash
|
||||
# Start Morshu TTS Server
|
||||
|
||||
# Quick start script for Morshu TTS Server
|
||||
|
||||
echo "🗣️ Starting Morshu TTS Server..."
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# 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 "../morshutalk_morshu.wav" ]; then
|
||||
echo "❌ Error: morshutalk_morshu.wav not found in parent directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Start the server
|
||||
echo "✅ Starting server on port ${PORT:-3002}..."
|
||||
echo "🗣️ Using MorshuTalk engine"
|
||||
exec python3 server.py
|
||||
|
||||
Reference in New Issue
Block a user