home-assistant: Deploy Piper and Whisper

Piper is the new text-to-speech service for Home Assistant.  Whisper is
a speech-to-text service.  Together, these services, which communicate
with Home Assistant via the Wyoming protocol, provide the speech
interface to the new Home Assistant Voice Assistant feature.
This commit is contained in:
2023-08-02 19:59:30 -05:00
parent a7eac14d39
commit 0cbda0fd73
6 changed files with 237 additions and 27 deletions

90
home-assistant/piper.yaml Normal file
View File

@@ -0,0 +1,90 @@
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: piper
app.kubernetes.io/instance: piper
app.kubernetes.io/name: piper
app.kubernetes.io/part-of: home-assistant
name: piper
spec:
ports:
- port: 10200
name: wyoming
selector:
app.kubernetes.io/component: piper
app.kubernetes.io/instance: piper
app.kubernetes.io/name: piper
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: piper
app.kubernetes.io/instance: piper
app.kubernetes.io/name: piper
app.kubernetes.io/part-of: home-assistant
name: piper
spec:
selector:
matchLabels:
app.kubernetes.io/component: piper
app.kubernetes.io/instance: piper
app.kubernetes.io/name: piper
template:
metadata:
labels:
app.kubernetes.io/component: piper
app.kubernetes.io/instance: piper
app.kubernetes.io/name: piper
app.kubernetes.io/part-of: home-assistant
spec:
containers:
- name: piper
image: docker.io/rhasspy/wyoming-piper
args:
- --voice=en-us-amy-low
ports:
- containerPort: 10200
name: wyoming
readinessProbe: &probe
tcpSocket:
port: 10200
failureThreshold: 3
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 1
startupProbe:
<<: *probe
failureThreshold: 30
periodSeconds: 3
initialDelaySeconds: 3
securityContext:
readOnlyRootFilesystem: true
runAsUser: 300
runAsGroup: 300
volumeMounts:
- mountPath: /data
name: piper-data
subPath: data
- mountPath: /tmp
name: piper-temp
subPath: tmp
securityContext:
fsGroup: 300
volumes:
- name: piper-data
ephemeral:
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
- name: piper-temp
emptyDir:
medium: Memory