morshu-server: add proper start script and systemd service

This commit is contained in:
2026-06-06 19:45:12 -05:00
parent 57b51be48e
commit c9e9b7c91e
2 changed files with 45 additions and 1 deletions
@@ -0,0 +1,15 @@
[Unit]
Description=Morshu TTS Server
After=network.target
[Service]
Type=simple
User=owen
WorkingDirectory=/home/owen/Desktop/ttstoy/morshu-server
Environment=PORT=3002
ExecStart=/usr/bin/python3 /home/owen/Desktop/ttstoy/morshu-server/server.py
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
+30 -1
View File
@@ -1,4 +1,33 @@
#!/bin/bash #!/bin/bash
# Start Morshu TTS Server
# Quick start script for Morshu TTS Server
echo "🗣️ Starting Morshu TTS Server..."
cd "$(dirname "$0")" 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 exec python3 server.py