localai
RETIRED — manage the (now decommissioned) per-machine mlx-audio TTS/STT stack; TTS/STT moved to the cloud audio-gateway (VPS)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
RETIRED — manage the (now decommissioned) per-machine mlx-audio TTS/STT stack; TTS/STT moved to the cloud audio-gateway (VPS)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Read and write the second brain — a git-backed Obsidian vault at ~/SourceRoot/brain (PARA structure + a top-level wiki/ knowledge tree). Use whenever the user mentions "brain", "second brain", "knowledge base", "note", "remember", "look up", "find note", "capture", "wiki", or "okf". Also use for any request to save, retrieve, or organize personal knowledge that belongs in the brain rather than in a repo-specific doc.
Write, draft, and polish prose through a human-owned 7-step pipeline. Use whenever the user says "distill", "write article", "draft", "summarize into", "create content", "synthesize", or "publish". Also use for any task where the output is a piece of long-form writing — the pipeline keeps prose quality out of coding sessions.
Operate the Mac mini remote dev host — connecting from the MacBook over mosh or herdr --remote, running and reattaching many Claude Code agents, herdr workspaces/panes and its socket API, claude --bg durable daemons, the Uptime Kuma readiness heartbeat, and the failure modes specific to a headless always-on Mac. Use when the user mentions herdr, mosh, the mini, "remote dev", "dev host", detaching or reattaching agents, "did my agent survive", sessions dying on lid-close, or asks how to reach a dev server running on the mini.
Manage the personal image stack — public CDN uploads/transform URLs and the private image-share layer. Use whenever an image needs a URL (public or private) for an article, blog post, vault note, README, OpenGraph tag, or a one-off share; or when the user says "upload this image", "share this image", "private image", "publish image", "host this screenshot", "get me a CDN link", "resize this", mentions "image-share", or asks where an image lives.
Bidirectionally sync ALL git repos across two machines — this MacBook and the always-on Mac mini — over SSH, using GitHub/GitLab as the transport. Commits and pushes uncommitted work on both sides, then rebases/fast-forwards each so they converge, with per-repo subagents resolving rebases and merge conflicts. This is a MULTI-repo, TWO-machine operation — distinct from /commit, /ship, or /git-cleanup, which act on a single repo. Use whenever the user wants to sync their machines/repos, "catch up" the laptop to the Mac mini or push laptop work back, is about to travel or just got back, has uncommitted work scattered across many repos, or wants to reconcile branches that diverged between the two machines. Trigger even on a bare "sync", "sync my machines", or "get my repos up to date".
Run validation (format, lint, tsc, test) via sideclaw MCP tool
| name | localai |
| description | RETIRED — manage the (now decommissioned) per-machine mlx-audio TTS/STT stack; TTS/STT moved to the cloud audio-gateway (VPS) |
⚠️ RETIRED 2026-05-25. This stack is no longer installed or running. TTS/STT moved to the cloud audio-gateway (
~/SourceRoot/audio-gateway, VPS container ataudio-gateway.jkrumm.com,https://audio-gateway.jkrumm.com/v1over the tailnet) in front of the IU unified audio endpoint. Files are kept for an easy re-add. Tear down a live install withmake localai-teardown. The commands below only apply if the stack is reinstated.
Per-machine mlx-audio (TTS + STT) bound to 127.0.0.1:8000. Installed automatically by make setup. No Tailscale exposure, no Ollama, no LLM — Hermes uses cloud Sonnet 4.6 via the IU unified endpoint.
Full documentation: Read ~/SourceRoot/dotfiles/localai/README.md first.
| Component | Service | Port |
|---|---|---|
| mlx-audio (STT only — Parakeet) | com.localai.audio | 8000 (localhost) |
| fish-s2-pro (TTS — Fish Audio S2 Pro) | com.localai.fish | 8002 (localhost) |
| localai-helper (FastAPI orchestration layer — TTS pipeline, STT response transform) | com.localai.helper | 8001 (localhost) |
Models (both warm on launchd start):
mlx-community/parakeet-tdt-0.6b-v3 — 1.2 GB, 25 EU langs incl. EN/DE, 10–60× RTappautomaton/fishaudio-s2-pro-8bit-mlx — 6.7 GB, clone-only with two production references (Pip Klöckner for de with smile EQ, Ethan from fish.audio demos for en)Hermes calls :8001/v1/tts/synthesize (the helper) for all TTS. The helper handles language detection, speakable rewrite (Haiku), title (Haiku), paragraph-aware chunking, Fish synthesis at :8002, and MP3 encoding. DE output gets a smile EQ applied server-side by Fish. Inline emotion tags ([chuckle], [whisper], [pause], [excited], …) are first-class — see localai/fish-s2-pro/REFERENCE.md.
Why Parakeet, not Whisper: mlx-audio 0.4.2 has a Whisper bug — load_model() doesn't attach WhisperProcessor (required for get_tokenizer()). Patching at request-time triggers an MLX Metal threading crash. Parakeet works cleanly.
MacWhisper endpoint: https://whisper.test — Caddy block in config/Caddyfile rewrites Content-Type to application/json (mlx-audio's application/x-ndjson confuses MacWhisper's parser). Use any STT model id (e.g., mlx-community/parakeet-tdt-0.6b-v3).
/localai setupRun the Makefile target — does everything (mlx-audio, deps, ffmpeg, m4a patch, plist install + load):
cd ~/SourceRoot/dotfiles
make _setup-localai
Or as part of full setup: make setup.
First run downloads ~2 GB of Python deps. Parakeet (1.2 GB) downloads on first STT request and caches at ~/.cache/huggingface/hub/.
/localai statusecho "=== mlx-audio (127.0.0.1:8000) ==="
curl -sf http://127.0.0.1:8000/v1/models | jq -r '.data[]?.id' 2>/dev/null \
|| echo "DOWN — check tail /tmp/audio.err"
echo ""
echo "=== launchd ==="
launchctl list | grep com.localai.audio || echo "Not loaded"
echo ""
echo "=== Warm-up log ==="
tail -3 /tmp/mlx-audio-warmup.log 2>/dev/null
echo ""
echo "=== System ==="
memory_pressure | head -1
/localai update# Upgrade mlx-audio + deps
uv tool upgrade mlx-audio
uv pip install --python ~/.local/share/uv/tools/mlx-audio/bin/python3 "setuptools<81" python-multipart
uv pip install --python ~/.local/share/uv/tools/mlx-audio/bin/python3 \
"misaki[en]<0.9" num2words phonemizer espeakng_loader spacy
# Re-apply m4a STT patch (uv tool upgrade overwrites server.py)
patch -p1 -d ~/.local/share/uv/tools/mlx-audio/lib/python3.12/site-packages \
< ~/SourceRoot/dotfiles/localai/patches/mlx-audio-m4a-stt.patch
# Restart
launchctl kickstart -k gui/$(id -u)/com.localai.audio
Or just re-run make _setup-localai — it handles all of the above idempotently.
/localai swap-model <component> <model>Components: tts | stt.
STT default (warm-on-start): edit the wrapper script env or set LOCALAI_STT_MODEL in the audio plist:
<key>EnvironmentVariables</key>
<dict>
<key>LOCALAI_STT_MODEL</key><string>mlx-community/parakeet-tdt-0.6b-v3</string>
...
</dict>
Then restart: launchctl kickstart -k gui/$(id -u)/com.localai.audio.
Per-request: any client can specify any model in the API call — it lazy-loads.
Pre-load manually:
curl -X POST http://127.0.0.1:8000/v1/models \
-H 'Content-Type: application/json' \
-d '{"model":"<model-id>"}'
/localai stop / /localai startmake stop # launchctl unload com.localai.audio
make start # launchctl load com.localai.audio
Server won't start:
tail -50 /tmp/audio.err — startup errorspkg_resources error → uv pip install --python ~/.local/share/uv/tools/mlx-audio/bin/python3 "setuptools<81"lsof -i :8000STT not warm on first request:
/tmp/mlx-audio-warmup.log — should see "STT warm-up complete"localai/bin/start-mlx-audio.sh if needed.TTS request returns 404 from the helper:
tts_tool.py thin client posts to :8001/v1/tts/synthesize. If the helper isn't running, you'll see connection errors; if the route isn't registered (helper started before the route file existed), 404. Restart helper: launchctl kickstart -k gui/$(id -u)/com.localai.helper.Helper Haiku calls failing silently (no rewrite, generic title):
bin/start-localai-helper.sh injects ANTHROPIC_API_KEY + ANTHROPIC_BASE_URL from macOS Keychain. Verify:
security find-generic-password -s claude-sdk-api-key -w | head -c 8
security find-generic-password -s claude-sdk-base-url -w
make setup to rebuild the keychain cache.Slack voice memo "incorrect format" / m4a errors:
grep -q "ffmpeg" ~/.local/share/uv/tools/mlx-audio/lib/python3.12/site-packages/mlx_audio/server.py && echo "patched" || echo "MISSING"make _setup-localai