#!/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