Running multiple AI coding agents in parallel is a power move, but it quickly turns into a cacophony if every terminal window starts shouting updates at once. Developer Teo Furlan recently documented a solution to this exact problem: a local voice daemon that acts as a central traffic controller for audio output. By pulling the speech layer out of individual agents and into a single Python process, Furlan ensured that his agents, Pi and Claude Code, take turns speaking rather than overlapping into unintelligible noise.

The Architecture of Silence

The core of the system is a single daemon listening on 127.0.0.1:47830. It owns the microphone, the speaker, and a FIFO queue. Agents connect to this hub via different protocols: Pi uses HTTP and SSE, while Claude Code connects through a small stdio MCP server. The workflow relies on an "announce, then ask" pattern using five specific MCP tools. Instead of reading full replies aloud, an agent calls avisar_usuario with a one-line headline. The voice, powered by Piper's Spanish es_AR-daniela-high model, reads the headline and waits. The developer can then choose to hear the full detail (/contame), skip it (/descartar), or interrupt playback (/saltar).

Handling the Glitchy Reality of Hardware

Building a voice interface isn't just about code; it's about wrestling with operating system quirks. Furlan encountered a nasty bug where a switched-off Bluetooth headset broke dictation because Windows still listed the device as available. The fix involved re-enumerating audio devices on every recording session and explicitly excluding paired phones that masqueraded as microphones. Additionally, the system handles language mixing by stripping code blocks and URLs before synthesis, then using eSpeak to phonemize English technical terms within the Spanish voice model. This hybrid approach keeps the voice natural while ensuring terms like "pull request" or "commit" are pronounced correctly.

Security in a Localhost World

One might assume a local tool doesn't need heavy security, but Furlan learned otherwise. A security review revealed that DNS rebinding could allow a malicious web page to access the local voice stream. To patch this, the daemon now rejects any Host header that isn't 127.0.0.1 or localhost, and it requires a fresh 32-byte random token for every request. The token is written to %LOCALAPPDATA%\daniela\token on startup. Clients must perform an HMAC-SHA256 handshake before sending any sensitive text, ensuring that no other local process can squat the port and steal the audio feed.

Key Takeaways

  • Centralized Control: A single daemon prevents multiple agents from talking over each other, using a FIFO queue to manage audio priority.
  • Hybrid TTS: Using Piper for Spanish with eSpeak phonemization for English technical terms allows for natural-sounding updates that respect developer terminology.
  • Robust Security: Localhost services are vulnerable to DNS rebinding; Furlan implemented HMAC-based token authentication and strict Host header validation.
  • Hardware Resilience: The system dynamically re-enumerates audio devices to handle Bluetooth disconnects and fallback to laptop mics automatically.

The Bottom Line

This is a masterclass in building developer quality-of-life tools. It’s not about replacing the terminal with voice, but about using voice as a low-friction notification system that respects the developer's flow. The attention to detail on security and hardware edge cases shows this isn't just a hack; it's a production-ready workflow for the agentic era.