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

View File

@@ -0,0 +1,85 @@
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: whisper
app.kubernetes.io/instance: whisper
app.kubernetes.io/name: whisper
app.kubernetes.io/part-of: home-assistant
name: whisper
spec:
ports:
- port: 10300
name: wyoming
selector:
app.kubernetes.io/component: whisper
app.kubernetes.io/instance: whisper
app.kubernetes.io/name: whisper
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: whisper
app.kubernetes.io/instance: whisper
app.kubernetes.io/name: whisper
app.kubernetes.io/part-of: home-assistant
name: whisper
spec:
selector:
matchLabels:
app.kubernetes.io/component: whisper
app.kubernetes.io/instance: whisper
app.kubernetes.io/name: whisper
template:
metadata:
labels:
app.kubernetes.io/component: whisper
app.kubernetes.io/instance: whisper
app.kubernetes.io/name: whisper
app.kubernetes.io/part-of: home-assistant
spec:
containers:
- name: whisper
image: docker.io/rhasspy/wyoming-whisper
args:
- --model=base
- --language=en
ports:
- containerPort: 10300
name: wyoming
readinessProbe: &probe
tcpSocket:
port: 10300
failureThreshold: 3
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 1
startupProbe:
<<: *probe
failureThreshold: 30
periodSeconds: 3
initialDelaySeconds: 3
securityContext:
readOnlyRootFilesystem: true
runAsUser: 300
runAsGroup: 300
volumeMounts:
- name: whisper-data
mountPath: /data
subPath: data
securityContext:
fsGroup: 300
volumes:
- name: whisper-data
ephemeral:
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi