From 88549de0f8cd2b4a00a2ad85fecbafe13a99b308 Mon Sep 17 00:00:00 2001 From: michnovka Date: Sat, 28 Jun 2025 20:05:03 +0200 Subject: [PATCH] Add support for streaming (introduced in wyoming-piper 1.6.0) (#33) --- Dockerfile | 4 ++-- README.md | 2 ++ run.sh | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e5a56cc..cbbc693 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 AS build ARG TARGETARCH=linux_x86_64 -ARG WYOMING_PIPER_VERSION="1.5.2" +ARG WYOMING_PIPER_VERSION="1.6.1" ARG PIPER_VERSION="1.2.0" ARG PIPER_PHONEMIZE_VERSION="1.1.0" @@ -110,4 +110,4 @@ COPY --from=build /app . EXPOSE 10200 -ENTRYPOINT ["bash", "/app/run.sh"] \ No newline at end of file +ENTRYPOINT ["bash", "/app/run.sh"] diff --git a/README.md b/README.md index 55316db..b2636e9 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,8 @@ docker pull ghcr.io/slackr31337/wyoming-piper-gpu:latest > PIPER_SILENCE="0.8" > > LOG_LEVEL="debug" # For debug logging +> +> STREAMING=false # To disable streaming # Docker compose diff --git a/run.sh b/run.sh index cbeb86a..163c017 100644 --- a/run.sh +++ b/run.sh @@ -5,6 +5,12 @@ if [[ "${LOG_LEVEL}" == "debug" ]]; then LOGGING="--debug " fi +STREAMING="${STREAMING:-true}" +STREAMING_FLAG="" +if [[ "$STREAMING" == "true" ]]; then + STREAMING_FLAG="--streaming " +fi + # Run wyoming-piper server /app/bin/python3 -m wyoming_piper \ --piper '/app/piper/piper' \ @@ -18,4 +24,4 @@ fi --max-piper-procs "${PIPER_PROCS:-1}" \ --data-dir "${DATA_DIR:-/data}" \ --download-dir "${DOWNLOAD_DIR:-/data}" \ - --use-cuda ${LOGGING}"$@" + --use-cuda ${LOGGING}${STREAMING_FLAG}"$@"