1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-02-09 13:46:55 +02:00

update piper

This commit is contained in:
kev 2024-03-25 17:48:08 +08:00
parent 39f1db6f3d
commit bb09770e4d
2 changed files with 13 additions and 4 deletions

View File

@ -11,8 +11,12 @@ ARG PIPER_ARCH=x86_64
ARG PIPER_FILE=piper_${PIPER_OS}_${PIPER_ARCH}.tar.gz
ARG PIPER_URL=https://github.com/rhasspy/piper/releases/download/${PIPER_VERSION}/${PIPER_FILE}
ARG MODEL_BASE_URL=https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_US/lessac/medium
ARG MODEL_FILE=en_US-lessac-medium.onnx
ARG MODEL_BASE_URL=https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_US
ARG MODEL_URL_1=${MODEL_BASE_URL}/amy/medium/en_US-amy-medium.onnx
ARG MODEL_URL_2=${MODEL_BASE_URL}/joe/medium/en_US-joe-medium.onnx
ARG MODEL_URL_3=${MODEL_BASE_URL}/kristin/medium/en_US-kristin-medium.onnx
ARG MODEL_URL_4=${MODEL_BASE_URL}/lessac/medium/en_US-lessac-medium.onnx
ARG MODEL_URL_5=${MODEL_BASE_URL}/lessac/ryan/en_US-ryan-medium.onnx
WORKDIR /opt/piper
@ -20,8 +24,11 @@ RUN set -xe \
&& apt update -y \
&& apt install -y curl \
&& curl -sSL ${PIPER_URL} | tar xz --strip 1 \
&& curl -sSL -O ${MODEL_BASE_URL}/${MODEL_FILE} \
-O ${MODEL_BASE_URL}/${MODEL_FILE}.json \
&& curl -sSL -O ${MODEL_URL_1} -O ${MODEL_URL_1}.json \
-O ${MODEL_URL_2} -O ${MODEL_URL_2}.json \
-O ${MODEL_URL_3} -O ${MODEL_URL_3}.json \
-O ${MODEL_URL_4} -O ${MODEL_URL_4}.json \
-O ${MODEL_URL_5} -O ${MODEL_URL_5}.json \
&& ./piper --version \
&& apt remove -y curl \
&& rm -rf /var/lib/apt/lists/*

View File

@ -14,4 +14,6 @@ $ echo 'Welcome to the world of speech synthesis!' | piper -f /tmp/welcome.wav
$ play welcome.wav
```
List of voices: https://rhasspy.github.io/piper-samples/
[1]: https://github.com/rhasspy/piper