20 lines
530 B
Bash
20 lines
530 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
MODEL_DIR="${MODEL_DIR:-/data}"
|
|
|
|
echo "Checking model directory: $MODEL_DIR"
|
|
if [ -z "$(ls -A "$MODEL_DIR" 2>/dev/null)" ]; then
|
|
echo "Model directory is empty. Downloading GLaDOS model..."
|
|
python /app/download_model.py --output-dir "$MODEL_DIR"
|
|
else
|
|
echo "Model files found in $MODEL_DIR"
|
|
ls -la "$MODEL_DIR"
|
|
fi
|
|
|
|
echo "Starting Wyoming GLaDOS TTS server..."
|
|
exec python -m wyoming_glados \
|
|
--model-dir "$MODEL_DIR" \
|
|
--uri "${URI:-tcp://0.0.0.0:10200}" \
|
|
--device "${DEVICE:-cpu}"
|