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.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user