Skip to content

Commit ec7746f

Browse files
committed
No idea if it'll actually work
1 parent b9b803e commit ec7746f

5 files changed

Lines changed: 15 additions & 36 deletions

File tree

Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,28 @@ LABEL maintainer="thespad"
1212
ENV DEBIAN_FRONTEND="noninteractive" \
1313
TMPDIR="/run/piper-temp"
1414

15-
RUN --mount=type=bind,source=/patch,target=/patch \
15+
RUN \
1616
apt-get update && \
1717
apt-get install -y --no-install-recommends \
1818
python3-venv && \
1919
if [ -z ${PIPER_VERSION+x} ]; then \
20-
PIPER_VERSION=$(curl -sL https://pypi.python.org/pypi/wyoming-piper/json |jq -r '. | .info.version'); \
20+
PIPER_VERSION=$(curl -sL "https://api.github.com/repos/rhasspy/wyoming-piper/commits/master" \
21+
| jq -r .sha); \
2122
fi && \
23+
mkdir -p /tmp/piper-build && \
24+
curl -sL -o \
25+
/tmp/piper.tar.gz -L \
26+
"https://github.com/rhasspy/wyoming-piper/archive/${PIPER_VERSION}.tar.gz" && \
27+
tar xzf \
28+
/tmp/piper.tar.gz -C \
29+
/tmp/piper-build --strip-components=1 && \
30+
cd /tmp/piper-build && \
2231
python3 -m venv /lsiopy && \
2332
pip install -U --no-cache-dir \
2433
pip \
2534
wheel && \
35+
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ . && \
36+
pip uninstall -y onnxruntime && \
2637
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ \
2738
nvidia-cublas-cu12 \
2839
nvidia-cuda-nvrtc-cu12 \
@@ -31,8 +42,7 @@ RUN --mount=type=bind,source=/patch,target=/patch \
3142
nvidia-cufft-cu12 \
3243
nvidia-curand-cu12 \
3344
onnxruntime-gpu \
34-
piper-tts \
35-
"wyoming-piper==${PIPER_VERSION}" && \
45+
piper-tts && \
3646
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
3747
echo "**** cleanup ****" && \
3848
apt-get autoremove -y && \

patch/__main__.patch

Lines changed: 0 additions & 14 deletions
This file was deleted.

patch/process.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

readme-vars.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ opt_param_env_vars:
3333
- {env_var: "PIPER_NOISE", env_value: "0.667", desc: "Controls the variability of the voice by adding noise. Values above 1 will start to degrade audio."}
3434
- {env_var: "PIPER_NOISEW", env_value: "0.333", desc: "Controls the variability of speaking cadence. Values above 1 produce extreme stutters and pauses."}
3535
- {env_var: "PIPER_SPEAKER", env_value: "0", desc: "Speaker number to use if the voice supports multiple speakers."}
36-
- {env_var: "PIPER_PROCS", env_value: "1", desc: "Number of Piper processes to run simultaneously."}
3736
- {env_var: "STREAMING", env_value: "", desc: "Setting to `true`, or any other value, will enable support for streaming audio on sentence boundaries."}
3837
readonly_supported: true
3938
# application setup block

root/etc/s6-overlay/s6-rc.d/svc-piper/run

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,19 @@ if [[ -z ${LOCAL_ONLY} ]]; then
1515
UPDATE_MODELS=true
1616
fi
1717

18-
1918
LD_LIBRARY_PATH="/lsiopy/lib/python3.12/site-packages/onnxruntime/capi:$LD_LIBRARY_PATH"
2019

2120
exec \
2221
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 10200" \
2322
s6-setuidgid abc python3 -m wyoming_piper \
24-
--piper '/lsiopy/bin/piper' \
2523
--uri 'tcp://0.0.0.0:10200' \
2624
--length-scale "${PIPER_LENGTH:-1.0}" \
2725
--noise-scale "${PIPER_NOISE:-0.667}" \
2826
--noise-w "${PIPER_NOISEW:-0.333}" \
2927
--speaker "${PIPER_SPEAKER:-0}" \
3028
--voice "${PIPER_VOICE}" \
31-
--max-piper-procs "${PIPER_PROCS:-1}" \
3229
--data-dir /config \
3330
--download-dir /config \
34-
--cuda \
31+
--use-cuda \
3532
${UPDATE_MODELS:+--update-voices} \
3633
${STREAMING:+--streaming}
37-

0 commit comments

Comments
 (0)