Skip to content

Building the Kivi Whisper STT image on Forgejo

Status: image 3.8.1.1 published (digest sha256:938daef7b6e3fd76bb8601171a34b375df13b8bd37fc61a27b5b6a696f61680d); the cutover (Phase C) is rolled out 2026-11-05 with the owner's approval, see Rollout 2026-11-05 for the differences from this plan and the verification result. Date: 2026-11-05 Goal: replace pando85/wyoming-whisper:2.4.0 with an image built on wyoming-faster-whisper[hass]==3.8.1, so the STT step gets the live Home Assistant name list (--hass-token) and the static Spanish verb prefix (--initial-prompt), as designed in STT hint list and learning from usage (phase 1).

Evidence labels: documented, observed, inferred, hypothesis (as in the design doc).

Where the build lives

Everything about building the image is in the repository agil/wyoming-whisper (https://git.grigri.cloud/agil/wyoming-whisper, private, created 2026-11-05): the Dockerfile and the hashed lock, the Forgejo Actions workflow (build and push only on a tag), the transcript-log patch (transcripts at DEBUG, not INFO), the Renovate configuration, and the docs on the build pipeline, the sm_61 check, the runner disk, the risks and the image rollback. This page keeps only what belongs to the cluster.

Summary of the decisions (details and evidence in that repository):

  • Base ghcr.io/opennmt/ctranslate2:4.8.5-ubuntu22.04-cuda12.8 pinned by digest, Python 3.10, wyoming-faster-whisper[hass]==3.8.1, faster-whisper 1.2.1, ctranslate2 4.8.5.
  • GTX 1060 (sm_61): the driver 580 is the last Pascal branch, so the image stays on CUDA 12.x. cuobjdump on the local build shows sm_61 SASS in the CTranslate2 library (static evidence, 2026-11-05; the canary below is the gate). The local build is about 3.2 GB uncompressed, about 2 GB compressed.
  • Tags are <upstream version>.<revision> (first planned: 3.8.1.1), created by a human after the canary; no latest.
  • Pull access: the nodes' containerd already has a read-only credential for git.grigri.cloud (metal/roles/k3s/templates/host.toml.j2, the owner's own account, pull/resolve only), so a package owned by that account needs no imagePullSecret here (verified: the cluster runs this image).
  • Visibility: a package takes the visibility of its owner, not of the repository. Until 2026-11-05 the user agil was public and this image could be pulled anonymously although the repository is private; since agil became "limited" that day, anonymous pulls are refused.
  • Fallback if the runners' disks are at risk: build on GitHub and publish to ghcr.io/pando85/wyoming-whisper (only the image name changes here).

What the owner must do before the first tag

  1. Create a Forgejo token with only write:package, keep it in pass (0600 file) and set it as the repository secret PACKAGES_PAT (the FORGEJO_ prefix is reserved) of agil/wyoming-whisper.
  2. Optional: the Renovate secrets RENOVATE_PAT and RENOVATE_GITHUB_COM_TOKEN for that repository, then enable the schedule in its renovate.yml.
  3. Approve the first tag (v3.8.1.1); afterwards set the package cleanup rule (keep the last 3 versions).

Cluster plan

Steps marked [owner] need the owner; [approval] can be done by an agent after an explicit yes.

Phase B: GPU canary on prusik (before touching the real STT)

The card has 3 GB with about 1.1 GB in use, so do not run two large-v3-turbo instances. A tiny model needs well under 300 MiB. The check itself is described in the image repository (docs/sm61-verification.md); here is the cluster part.

  1. [approval, GitOps] Commit a temporary controller whisper-canary in apps/home-assistant/values.yaml: the new image (tag@sha256 from the job summary), args --model tiny-int8 --language es --device cuda --compute-type int8 --debug, nvidia.com/gpu: "1", runtimeClassName: nvidia, no Service and no Ingress, emptyDir for /data (it downloads the tiny model; needs egress to Hugging Face).
  2. [owner or approved exec] Read-only checks in the pod: python3 -c "import ctranslate2 as c; print(c.get_cuda_device_count(), c.get_supported_compute_types('cuda'))" (expect 1 and int8 in the list) and the pod log. A Wyoming transcribe of a short Spanish clip of the owner's own voice through kubectl port-forward is the end-to-end test; delete the clip afterwards. --debug also logs transcripts: use it briefly and do not paste the output.
  3. Pass: no CUDA error such as no kernel image is available for execution on the device, int8 supported, one transcript returned. Record the result in the image repository's docs/sm61-verification.md.
  4. Remove the canary controller (revert that commit).

Phase C: cutover (homelab GitOps)

All three changes in one commit home-assistant: Run whisper 3.8.1 with live Home Assistant names (or split into an inert ExternalSecret and ConfigMap commit first), pushed only with the owner's yes.

C1. Token Secret (Vault path already exists, see the Home Assistant token: secret/home-assistant/wyoming-whisper, key hass_token):

apps/home-assistant/templates/external-secret-whisper.yaml

apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
  name: whisper-hass-token
spec:
  secretStoreRef:
    kind: ClusterSecretStore
    name: vault
  target:
    name: whisper-hass-token
  data:
    - secretKey: hass_token
      remoteRef:
        key: /home-assistant/wyoming-whisper
        property: hass_token

C2. Prompt ConfigMap apps/home-assistant/templates/configmap-whisper-prompt.yaml (generic Spanish verbs only, no home names, no "Kivi"; text from section 2.2 of the design doc, changing it needs the study's comparison):

apiVersion: v1
kind: ConfigMap
metadata:
  name: whisper-prompt
data:
  initial-prompt.txt: >-
    Enciende, apaga, sube, baja, abre, cierra, para, pausa, reanuda, silencia, quita el silencio,
    pon, temporizador, minutos, volumen, brillo, por ciento, grados.

C3. apps/home-assistant/values.yaml, controller whisper

    whisper:
      type: deployment
      replicas: 1
      annotations:
        reloader.stakater.com/auto: "true"      # roll on ConfigMap/Secret change (Recreate: a short STT gap)
      ...
      containers:
        whisper:
          image:
            repository: git.grigri.cloud/agil/wyoming-whisper
            tag: 3.8.1.1@sha256:<digest from the A5 job summary>
          args:
            - --model
            - large-v3-turbo
            - --language
            - es
            - --device
            - cuda
            - --compute-type
            - int8
            - --hass-api
            - http://home-assistant-hass.home-assistant.svc:8123/api
            - --hass-refresh-seconds
            - "300"
          env:
            WYO_WHISPER_HASS_TOKEN_FILE: /secrets/hass_token
            WYO_WHISPER_INITIAL_PROMPT_FILE: /prompt/initial-prompt.txt
and under persistence:
    whisper-hass-token:
      enabled: true
      type: secret
      name: whisper-hass-token
      advancedMounts:
        whisper:
          whisper:
            - path: /secrets
              readOnly: true
    whisper-prompt:
      enabled: true
      type: configMap
      name: whisper-prompt
      advancedMounts:
        whisper:
          whisper:
            - path: /prompt
              readOnly: true
The image repository is private, so the homelab Renovate cannot read its tags: drop the # renovate: hint above (or add a host rule with a read:package token) and bump the tag by hand after each canary.

Notes: the token file is the Vault value as stored; the server may not strip a trailing newline (hypothesis, check in the first --debug log). Keep --model and --language explicit (3.x defaults them to auto). The existing probes (TCP 10300) still work.

C4. Verify (the design doc's phase 1 gate): the pod starts without re-downloading the model (hypothesis: 3.x reuses /data/models--mobiuslabsgmbh--faster-whisper-large-v3-turbo; if it starts downloading, the startup probe's 150 s will kill it, so first run with --local-files-only or raise failureThreshold for the first start); --debug for a few minutes to read the composed prompt (verbs first, then names, dropped-name count), then remove --debug; STT p50 within 0.1 s of 0.86 s; the owner's spot check on 20 home commands.

C5. When to do it: off-hours. Recreate plus the model load makes the STT unavailable for the duration of the start (about the probe's 150 s worst case).

Phase D: rollback to 2.4.0

  1. git revert the cutover commit (one revert restores image, args, env, the mounts; do not revert only the image, because 2.4.0 rejects --hass-api and --hass-refresh-seconds). Push with the owner's yes and let ArgoCD sync; Recreate brings 2.4.0 back.
  2. pando85/wyoming-whisper:2.4.0 stays pullable from Docker Hub (tag dated 2025-02-28) and is still in prusik's containerd cache. Do not delete the Docker Hub tag until the new image has run for a few weeks.
  3. The model volume needs no repair: 3.x only adds files under /data (Xet cache), 2.4.0 ignores them.
  4. If only the hint list misbehaves (echoed names, odd transcripts), do not roll back the image: drop --hass-token handling by deleting WYO_WHISPER_HASS_TOKEN_FILE, or revoke the token in Home Assistant (the server falls back to the static prefix on 401, per the design doc).
  5. Remove the whisper-hass-token ExternalSecret and the token itself only when abandoning the feature.
  6. Image-level rollback (previous tag, older CT2 base if sm_61 fails) is in the image repository's docs/rollback.md.

Who does what

Step Owner Agent, with approval
Create the packages token (write:package), store it in pass, set the repository secret yes no (an agent must not mint or see it)
Vault token for --hass-token done 2026-11-05 read-only check of the path only
First tag v3.8.1.1 and the package cleanup rule approve, UI for the rule tag push with approval
Canary controller commit, cutover commit, ArgoCD sync approve each push yes (commit, push, sync)
kubectl exec/port-forward in the canary pod, voice clip for the test yes, or approve only with approval
Spot check of 20 commands, go or no-go yes no
Docs and compatibility record of results no yes

Cluster-side risks

  • GPU, driver, sm_61 and the runner disk: see the image repository's docs/risks.md. A driver or GPU operator bump past 580 breaks this card for every GPU pod.
  • Circularity. Forgejo and the STT pod both run on prusik. A cold start after a node reboot with an empty containerd cache waits for Forgejo; the digest pin and IfNotPresent keep this a retry, not an outage.
  • Model cache reuse and token newline (C3, C4) are untested hypotheses with a cheap check in the first start.
  • Version jump 2.4.0 to 3.8.1 (also faster-whisper, ctranslate2, wyoming, Python, CUDA): compare p50 and the 20-command check against the 2.4.0 baseline.
  • Admin token in the STT pod (accepted in the design doc): Home Assistant tokens have no scopes; never put the token or entity names in the image repository, its Actions logs or pasted --debug output.
  • Transcripts are no longer written to the whisper log at INFO (patched to DEBUG in the image); the Vector rule that drops voice transcripts before Loki still applies to the old image until the cutover.

Rollout 2026-11-05

Rolled out 2026-11-05 as one commit (home-assistant: Run whisper 3.8.1 with live Home Assistant names). Differences from the plan above, checked against the image's own --help and source (the image wins):

  • No ConfigMap and no WYO_WHISPER_INITIAL_PROMPT_FILE: the static verbs prompt is the single --initial-prompt argument (the verified single-argument form from the conversation-agent decisions). The server puts it first and appends the names (vocabulary.py, _build_prompt).
  • Token via WYO_WHISPER_HASS_TOKEN_FILE=/secrets/hass_token as planned; the server reads the file and strip()s it, so the trailing-newline hypothesis is closed (static check in the image, 2026-11-05).
  • The controller carries reloader.stakater.com/auto so a changed token Secret rolls the pod.
  • Model cache: the entrypoint passes --data-dir /data --download-dir /data as in 2.4.0, HF_HOME and XDG_CACHE_HOME are /data, large-v3-turbo maps to mobiuslabsgmbh/faster-whisper-large-v3-turbo, and the existing volume holds exactly /data/models--mobiuslabsgmbh--faster-whisper-large-v3-turbo (1.6 GB, read-only ls/du on the 2.4.0 pod): the cache is reused (static evidence; the first start log is the check).
  • The startup probe allows 60 failures x 5 s (was 30) as insurance against a re-download.
  • Log level is the default (INFO, no --debug); transcripts are logged only at DEBUG in this image.

Verification result 2026-11-05

Synced at 15:50Z (ArgoCD about 3 minutes after the push), pod Running after 42 s with 0 restarts, the ExternalSecret SecretSynced, no model download, no CUDA error. The log at INFO shows only Biasing toward names from <HA API> and Ready, then Processing audio lines, no transcript lines (Loki: none; Vector drop_voice_transcripts stopped increasing). Direct Wyoming round trip with 10 synthetic Spanish commands twice: stop-to-transcript p50 0.91 s (max 0.95 s) against 0.86 s on 2.4.0 measured with the same clips the same day; the three differing transcripts (digits for number words, one "Con" for "Pon") were identical on 2.4.0. GPU memory 1141 MiB before, 1101 MiB after. Not verified: the number of names in the hint list (logged at DEBUG only) and the 20-command spot check by the owner.

Change 2026-11-07: Silero VAD filter on

Owner-approved 2026-11-07 to stop room noise being transcribed as words. Commit 5690fe717 (home-assistant: Enable the Silero VAD filter on whisper): one argument, --vad-filter, added to the whisper container in apps/home-assistant/values.yaml. Source of the choice: HA-side audio processing research (satellite repository, docs/research/ha-side-audio-processing.md, section 2.3). The flag is in the image's --help (3.8.1: "Enable Silero VAD to filter out non-speech which can reduce hallucinations", default off, faster-whisper only).

  • Not enabled: --vad-endpointing (it would replace Home Assistant's end-of-command logic and has no maximum duration), --vad-clip. Thresholds stay at the defaults (--vad-threshold 0.5, --vad-min-speech-ms 250, --vad-min-silence-ms 2000).
  • Rollout: only the whisper pod restarted (new ReplicaSet); home-assistant-hass-0 did not restart as a result of this change. Argo CD Synced and Healthy at 5690fe717, pod Ready, args confirmed with kubectl get pod -o jsonpath.
  • Smoke test (synthetic audio only, Piper es_AR-daniela-high through a port-forward, Wyoming client): a 2.6 s Spanish command sentence gave a full transcript (12 words, correct); 5 s of digital silence and 5 s of synthetic white noise both gave an empty transcript. No before/after comparison was run on the old pod, and no household audio was used.
  • Not verified: the effect on real room noise and on soft or short real commands (a high VAD threshold can cut them; the defaults are used). Watch for new stt-no-text-recognized results on real commands; the Loki transcript study (data-register.md) shows empty transcripts.
  • Rollback: remove the --vad-filter line (and its comment) from the whisper args in apps/home-assistant/values.yaml, commit, push; Argo CD restarts only the whisper pod. No data or image change.