-
Notifications
You must be signed in to change notification settings - Fork 521
/
Copy pathDockerfile
45 lines (38 loc) · 1.24 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#---
# name: wyoming-piper
# group: wyoming
# config: config.py
# depends: [homeassistant-base, cuda, cudnn, python:3.11, piper-tts]
# test: test.sh
# requires: '>=34.1.0'
# docs: docs.md
# notes: The `piper-tts` using the `wyoming` protocol for usage with Home Assistant. Based on `https://github.com/home-assistant/addons/tree/master/piper` and `https://github.com/rhasspy/wyoming-piper`
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG FORCE_BUILD=off \
WYOMING_PIPER_VERSION \
WYOMING_PIPER_BRANCH
ENV PIP_BREAK_SYSTEM_PACKAGES=1 \
WYOMING_PIPER_VERSION="$WYOMING_PIPER_VERSION" \
WYOMING_PIPER_BRANCH="$WYOMING_PIPER_BRANCH" \
PIPER_CACHE=/data/models/piper \
PIPER_PORT=10200 \
PIPER_UPDATE_VOICES="true" \
PIPER_LENGTH_SCALE="1.0" \
PIPER_NOISE_SCALE="0.667" \
PIPER_NOISE_W="0.333" \
PIPER_SPEAKER="777" \
PIPER_VOICE="en_US-libritts_r-medium" \
PIPER_MAX_PROC="1" \
PIPER_DEBUG="true"
COPY rootfs/ /
COPY *.sh *.diff /tmp/wyoming/piper/
WORKDIR /usr/src
RUN /tmp/wyoming/piper/install.sh || /tmp/wyoming/piper/build.sh
EXPOSE ${PIPER_PORT}/tcp
HEALTHCHECK --start-period=10m \
CMD echo '{ "type": "describe" }' \
| nc -w 1 localhost ${PIPER_PORT} \
| grep -q "piper" \
|| exit 1