An open standard and architectural specification for bidirectional, hands-free acoustic loops connecting physical audio hardware to autonomous agent runtimes on macOS.
Modern autonomous AI coding agents execute multi-step tool calls, test suites, and refactors in the background. Traditional interactive paradigms require constant terminal split-pane babysitting and manual keyboard focus switching.
VoiceFi defines a lightweight local loopback protocol operating over a WebSocket server and Unix Domain Socket at localhost:8765. Runtimes communicate using standardized JSON-RPC 2.0 frames.
[Agent Runtime (Antigravity/Claude)]
โ (JSON-RPC 2.0 over WebSocket)
โผ
[VoiceFi Daemon (Port 8765)]
โโโ Acoustic Clean Engine
โโโ Microsoft Edge / Neural TTS Audio Pipeline
โโโ Local Faster-Whisper (Metal CoreML)
โโโ macOS Native Audio Session (CoreAudio)
Emitted by the agent hook when execution finishes:
{
"jsonrpc": "2.0",
"method": "agent.turn_completed",
"params": {
"session_id": "conv-6f6b2d64",
"agent_name": "Antigravity",
"persona": "Christopher",
"summary": "Completed unit tests for authentication module. 12 passing.",
"auto_listen": true,
"vad_silence_timeout_ms": 1200
}
}
Emitted by VoiceFi when user speech has been transcribed and is ready for runtime injection:
{
"jsonrpc": "2.0",
"method": "voice.transcription_completed",
"params": {
"text": "Looks great, create the pull request now.",
"duration_ms": 1420,
"confidence": 0.984,
"engine": "faster-whisper-metal"
}
}
/v1/speak
Synthesize and speak acoustic payload using assigned persona.
/v1/listen
Open ambient microphone with energy-based VAD.
/v1/status
Return daemon health, active audio devices, and latency metrics.
VoiceFi servers MUST bind strictly to 127.0.0.1 loopback interface. External network exposure is prohibited. Microphone buffers are processed in transient memory pools and zero audio frames are written to persistent storage without explicit user invocation of vifi memo record.