Add support for streaming (introduced in wyoming-piper 1.6.0) (#33)

This commit is contained in:
michnovka 2025-06-28 20:05:03 +02:00 committed by GitHub
parent c803b9372e
commit 88549de0f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 3 deletions

View File

@ -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"]
ENTRYPOINT ["bash", "/app/run.sh"]

View File

@ -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

8
run.sh
View File

@ -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}"$@"