A local-first personal voice agent: say its name, talk naturally, and it works on your computer while it keeps talking.
Wake word, voice activity and turn-taking, barge-in, local text-to-speech, a warm DeepSeek agent per chat, memory, tools with
spoken-confirmation gates, and a small mascot UI. The macOS app is working; Windows is planned (docs/PORTING.md).
(Working name in the code is still Tandem; the rename is one separate commit.)
git clone <this repo> boop && cd boop
scripts/setup.sh # speech-swift (pinned, patched), Python envs, agent config, models, app build
security add-generic-password -s boop -a deepseek -w # paste your DeepSeek key when asked (or put DEEPSEEK_API_KEY in ~/.config/boop/config.env)
scripts/test.sh # layer check, Python tests, 16 Swift self-test suites (no mic or models; needs the built app, see Limits)
platform/macos/.build/release/Tandem # run the dev build (menu-bar app); platform/macos/build_app.sh installs Tandem.appscripts/setup.sh --check reports what is missing without changing anything; --full adds the Kyutai streaming voice.
docs/PURPOSE.md |
what this is for, in one page |
docs/ARCHITECTURE.md |
layout, layers, rules, decisions |
core/spec/PROTOCOLS.md |
how the app talks to its helper processes |
platform/macos/ |
the Swift app, in layers: Core, Platform, Wake, Voice, Agent, Setup, State, UI, App |
agent/, voice/, decider/ |
Python: lead-agent harness and MCP tools, TTS servers, local decision helpers |
config/ |
pinned models, helper prompts, project registry template |
docs/PERSONAL_AGENT.md |
the confirm-before-act gate, contacts/calls and file-index connectors |
docs/INVENTORY.md, docs/MIGRATION.md |
what came from the old trees, what was dropped and why |
Nothing personal or heavy is stored here: models, audio, voiceprints, chats, screenshots, venvs, logs and keys live outside the
repository (docs/ARCHITECTURE.md, "State and secrets") and are excluded by .gitignore.
Main metric: voice latency, from the user's last word to the first audio out, plus barge-in cut-off. A full number needs the
microphone, STT, DeepSeek and the speakers, which this check does not touch. bench/bench_latency.py compiles the pure Swift
Core (TurnTaking, BargeIn, SpeechChunker) with swiftc and measures what is measurable; every number is in
results/INDEX.md.
| Measure | Before | After (this repo) | Published best cascade | Goal (1.5x faster) | Met |
|---|---|---|---|---|---|
| Wait after the last word before the turn ends, mean of 20 utterances | 768 ms (fixed) | 592 ms (416 ms for a finished sentence) | n/a | ||
| Headless budget: end-of-turn wait + Piper first chunk (repo-reported 110 ms) | 878 ms | 526 ms | 410 ms P50 | ~273 ms | no |
| Barge-in cut-off, synthetic user above the echo floor | 480 ms (704 ms for a quiet user) | no verified cascade figure found | n/a | ||
| Words before the first spoken piece | 14.3 (sentence only) | 7.3 (first comma) | n/a |
The endpoint wait fell 23% on this corpus. The goal is not met: a finished sentence already costs 416 ms of waiting, and the budget leaves out final STT, the DeepSeek first token and playback start, which would add to it.
False end-of-turn (synthetic, relative only: the classifier and the 20 utterances share one author). Every proper word-prefix of the corpus (100 cases per pause) is treated as a mid-sentence pause; a cut is false when the rule's wait is no longer than the pause.
| Mid-sentence pause | Fixed 768 ms (default) | Adaptive (opt-in) |
|---|---|---|
| 300 / 400 ms | 0% | 0% |
| 500 / 600 / 700 ms | 0% | 20% |
Adaptive cuts users off, so the default stays the fixed 768 ms wait. Adaptive is a setting:
defaults write <app> adaptiveTurn -bool true. The 592 ms figure above is what that setting gives, not the default.
Sources for the published numbers (pages opened and read 2026-11-24; quotes are verbatim):
- Best comparable cascade, 410 ms: "Pipecat + Claude + Cartesia (cascade): 410ms"; also "Deepgram + Claude + ElevenLabs: 480ms", local "Whisper + Llama 70B + Coqui: 870ms", OpenAI Realtime "232ms" (third-party benchmark): https://dev.to/kenimo49/i-benchmarked-5-voice-ai-stacks-only-2-stayed-under-300ms-2bka
- Kyutai Unmute (primary): "In total, the response latency is below a second." No ms figure: https://kyutai.org/unmute/
- Moshi (primary, speech-to-speech, not a cascade): "theoretical latency of 160ms ... 200ms in practice": https://arxiv.org/html/2410.00037v2
- Not opened, not used: OpenAI hello-gpt-4o, PersonaPlex, LiveKit/HF playbook.
Goal = 410 / 1.5 = 273 ms. Not met: the headless budget alone is 526 ms with adaptive, 878 ms with the default.
- The barge-in run uses synthetic noise, a stub VAD and a stub voiceprint (similarity = 0.6 x share of the window that is user audio). It tests the detector's gates and 200 ms check cadence, not real echo or real voices. The 480 ms is audio time.
- The turn-end wait is the silence rule alone. The real wait adds the STT final and the 256 ms pause before the transcript is read.
- The 110 ms TTS figure is quoted from
docs/research/portable-core-plan.md, not measured here. Kokoro int8 is 274-532 ms there. - Corpora are 20 utterances and 6 replies I wrote. They are small.
- The 16 Swift self-test suites need
scripts/setup.sh(vendored speech-swift, network) and were not run here:swift buildfails (rc 1) becausevendor/speech-swiftis not cloned, andscripts/setup.shclones it over the network. scripts/test.shuses the repo-local.venv(scripts/setup.sh, pinnedmcpinrequirements/main.txt).- No demo image: there is no headless output of this project worth showing.
- A real end-to-end number (mic to speaker) with a stub model is not built.
- No CI. The app needs macOS 15 and Xcode, so an ubuntu runner cannot build it.