Whisper stt macmini
title: Whisper speech-to-text on the Mac mini description: Self-hosted whisper.cpp speech-to-text service on the Mac mini for the in-room voice assistant: how it is built, installed, secured and operated. audience: internal type: reference owner: platform-team last_reviewed: 2026-11-19
Self-hosted speech-to-text for the in-room voice assistant. It replaces the phone browser's speech recognition (Google or Apple), so guest audio stays on our hardware. It is a separate service and does not replace the ai agent.
Not managed by GitOps
This runs on the Mac mini host itself (launchd), not in k3s. No ArgoCD Application points at it. It is installed by hand from whisper-stt-macmini.tar.gz, the same way headscale/ is applied by hand.
| Host | castismac1 (<MAC_MINI_IP>), Apple M4, 32 GB, macOS 26, service user <USER> |
| Endpoint | http://<MAC_MINI_IP>:9401/inference (Bearer token required) |
| Requested by | The voice-assistant spec, 2026-10-09 |
| Installed | 2026-10-09: whisper.cpp 1.9.5, ffmpeg 9.0.2, Caddy v2.11.7, ggml-small.bin |
| Model SHA-256 | 1be3a9b2063867b937e64e2ec7483364a79917e157fa98c5d94b5c1fffea987b |
For the concierge side that calls it (POST /voice/transcribe), see Concierge. The same Mac also runs the LLM and wall-e: see wall-e on the Mac mini and How a local LLM uses the Mac mini.
How it works¶
CoreAPI pod (k3s, 172.25.25.0/24)
│ POST /inference + Authorization: Bearer <token>
▼
Caddy <MAC_MINI_IP>:9401 IP allowlist, token check, 2 MB / 15 s limits,
│ only /inference + /health, no access log
▼
whisper-server 127.0.0.1:9400 whisper.cpp + ggml-small.bin on Metal (GPU);
ffmpeg converts browser audio (webm/m4a) to WAV
- Two ports. whisper-server has no authentication, and an open
POST /loadthat swaps the model by file path, so it listens only on localhost. Caddy is the only port open to the LAN. - Survives reboot and crash. Both run as LaunchDaemons (
/Library/LaunchDaemons/io.castis.whisper-*.plist) as the service user. They start at boot without anyone logging in, and launchd restarts them if they exit. - Privacy. There is no access log, whisper's stdout goes to
/dev/null, and temp audio is deleted after each request. - Firewall. The IP check is in Caddy only. The macOS firewall is deliberately left untouched.
- Shared host. It shares the Mac with llama-server (port 8001, GPU) and the UTM Linux VM (8 GB, 6 cores).
What is in the tar.gz¶
whisper-stt-macmini/
├── config.env the only file you edit (IPs, ports, threads, GPU on/off, model)
├── 00-preflight.sh read-only checks: arch, RAM, FileVault, sleep, ports, other workloads
├── 01-install.sh brew install whisper.cpp/ffmpeg/caddy, download + verify model
├── 02-enable-services.sh token, Caddyfile, power settings, load the launchd daemons (sudo)
├── 03-acceptance-test.sh local tests: transcribe, latency, EN/TH/KO, kill -9 restart
├── remote-test.sh run from a k3s node: proxy, token, /load blocked, size limit
├── uninstall.sh remove the daemons (keeps /opt/whisper)
├── README.md detailed runbook and design notes
└── templates/ launchd plists, Caddyfile, log-rotate script (rendered by 02)
Install on a fresh Mac¶
- From your laptop, copy and unpack:
scp whisper-stt/whisper-stt-macmini.tar.gz <USER>@<MAC_MINI_IP>:~/
ssh <USER>@<MAC_MINI_IP>
tar xzf whisper-stt-macmini.tar.gz && cd whisper-stt-macmini
chmod +x *.sh
chmod is in case permissions got lost in transit.
- Edit
config.envif needed (LAN_IP,ALLOWED_IPS,USE_GPU, and so on). - Run the scripts in order:
./00-preflight.sh | tee preflight.txt
./01-install.sh
sudo ./02-enable-services.sh
./03-acceptance-test.sh
- FileVault must be Off, or the Mac won't boot unattended. The preflight checks this.
01-install.shasks for sudo once, to create/opt/whisper.02-enable-services.shshould end withhealthy after Ns.
If Terminal says Operation not permitted when copying from ~/Downloads, give Terminal access in System Settings → Privacy & Security → Files and Folders, or move the file to your home folder first.
Reboot test. Run sudo reboot. Don't log in at the console. Connect with ssh and run ./03-acceptance-test.sh again.
Test from a k3s node:
The script asks for the token (hidden).
Token¶
02-enable-services.shgenerates it once and stores it in/opt/whisper/secrets/token.env(mode 600, owned by the service user). It is not in this repo.- Read it once into the secret store for CoreAPI with
sudo cat /opt/whisper/secrets/token.env. Use the value afterWHISPER_TOKEN=. - To rotate it:
Then update CoreAPI.
API¶
POST http://<MAC_MINI_IP>:9401/inference
Authorization: Bearer <TOKEN>
Content-Type: multipart/form-data
file=<clip> response_format=json language=auto|en|th|zh|ja|ko|ms
| Status | Meaning |
|---|---|
200 |
{"text": "..."} |
401 |
Missing or wrong token |
403 |
IP outside ALLOWED_IPS |
413 |
Body larger than 2 MB |
504 |
Took longer than 15 s |
GET /health returns {"status":"ok"}.
Change settings¶
Edit config.env in the unpacked folder on the Mac mini, then run sudo ./02-enable-services.sh again. It is safe to re-run, and the token is kept.
| Setting | Default | Notes |
|---|---|---|
ALLOWED_IPS |
172.25.25.0/24 |
Space-separated IPs or CIDRs. Pods reach it through their node IP (SNAT). |
USE_GPU |
1 |
0 = CPU only (-ng). Try it if llama-server load makes latency spike. |
THREADS |
4 |
whisper -t |
MAX_BODY, MAX_SECONDS |
2MB, 15s |
From the spec's security section |
MODEL_FILE, MODEL_URL, MODEL_SHA1 |
ggml-small.bin |
Upgrade path: ggml-large-v3-turbo-q5_0.bin, SHA-1 e050f7970618a659205450ad97eb95a18d69c9ee. Re-run 01 and 02. |
Operate¶
launchctl print system/io.castis.whisper-server | grep -E 'state|pid|last exit'
launchctl print system/io.castis.whisper-proxy | grep -E 'state|pid|last exit'
sudo launchctl kickstart -k system/io.castis.whisper-server
tail -f /opt/whisper/logs/whisper-server.err.log
cat /opt/whisper/etc/VERSIONS
shasum -a 256 /opt/whisper/models/ggml-small.bin
sudo ./uninstall.sh
kickstart -krestarts the server.- The log has startup messages and errors only, no transcripts.
- Compare the
shasumoutput with the model SHA-256 in the table at the top. uninstall.shremoves the daemons. Runsudo rm -rf /opt/whisperto wipe the files too.
| Path on the Mac mini | What |
|---|---|
/opt/whisper/bin/ |
Links to whisper-server, ffmpeg, caddy, and rotate-logs.sh |
/opt/whisper/models/ |
The model and SHA256SUMS |
/opt/whisper/etc/ |
Rendered Caddyfile and VERSIONS |
/opt/whisper/secrets/ |
token.env (mode 600) |
/opt/whisper/logs/ |
stderr logs, rotated daily at 03:17, 7 kept |
/Library/LaunchDaemons/io.castis.whisper-{server,proxy,logrotate}.plist |
The services |
Status on 2026-10-09¶
- Installed and running on
castismac1. Metal confirmed, healthy after 2 s. - Acceptance tests 1–5 (
03-acceptance-test.sh,remote-test.sh, reboot) - Measured latency for a 4 s clip (target about 3 s or less), GPU vs CPU
- Token handed to the CoreAPI owner through the secret channel
- Test with real EN, TH and KO clips
- Open question: who owns and monitors this host long term?
The LAN hop is plain HTTP. Switch to Caddy tls internal if the token must not cross the LAN in clear text.