diff --git a/run.sh b/run.sh index 79fda55..cbeb86a 100644 --- a/run.sh +++ b/run.sh @@ -1,9 +1,14 @@ #!/usr/bin/env bash +LOGGING="" +if [[ "${LOG_LEVEL}" == "debug" ]]; then + LOGGING="--debug " +fi + # Run wyoming-piper server /app/bin/python3 -m wyoming_piper \ --piper '/app/piper/piper' \ - --uri 'tcp://0.0.0.0:10200' \ + --uri "${PIPER_URI:-tcp://0.0.0.0:10200}" \ --length-scale "${PIPER_LENGTH:-1.0}" \ --noise-scale "${PIPER_NOISE:-0.667}" \ --noise-w "${PIPER_NOISEW:-0.333}" \ @@ -11,6 +16,6 @@ --sentence-silence "${PIPER_SILENCE:-1.2}" \ --voice "${PIPER_VOICE:-en_US-amy-medium}" \ --max-piper-procs "${PIPER_PROCS:-1}" \ - --data-dir /data \ - --download-dir /data \ - --use-cuda "$@" + --data-dir "${DATA_DIR:-/data}" \ + --download-dir "${DOWNLOAD_DIR:-/data}" \ + --use-cuda ${LOGGING}"$@"