Files
dectalk-tts-server/start.sh
T
kingston b29d04ac2c Initial standalone dectalk TTS server extracted from the ttstoy bot cog
Self-contained HTTP service with engine, data, start script, systemd unit,
and documentation. Runs independently of the Discord bot on its fixed port.
2026-09-14 14:31:15 -05:00

21 lines
477 B
Bash
Executable File

#!/bin/bash
# Start script for the DECTalk TTS server.
# Installs node dependencies on first run, then runs the server.
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR"
if ! command -v ffmpeg >/dev/null 2>&1; then
echo "Error: ffmpeg is not installed. Install it with: sudo apt install ffmpeg"
exit 1
fi
if [ ! -d node_modules ]; then
echo "Installing node dependencies..."
npm install
fi
export PORT="${PORT:-33001}"
exec node server.js