e61a320499
Self-contained HTTP service with engine, data, start script, systemd unit, and documentation. Runs independently of the Discord bot on its fixed port.
18 lines
457 B
Bash
Executable File
18 lines
457 B
Bash
Executable File
#!/bin/bash
|
|
# Start script for the Morshu TTS server.
|
|
# Creates a local venv on first run, installs deps, then runs the server.
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
cd "$SCRIPT_DIR"
|
|
|
|
if [ ! -d venv ]; then
|
|
echo "Creating virtual environment..."
|
|
python3 -m venv venv
|
|
./venv/bin/pip install --upgrade pip
|
|
./venv/bin/pip install -r requirements.txt
|
|
fi
|
|
|
|
export PORT="${PORT:-33002}"
|
|
exec ./venv/bin/python "$SCRIPT_DIR/server.py"
|