Overview
In a typical voice setup, the main agent owns the TTS service and all agents share the same voice. But you can move TTS into each agent’s pipeline so that each agent speaks with a distinct voice. This makes handoffs more natural — the user hears a different voice when they’re transferred to a different agent.Architecture
The key change is in where TTS lives: Default (shared TTS):Per-agent TTS requires all agents to run in the same process (local bus). Streaming audio frames across a network bus adds too much latency for real-time conversations. For distributed setups, remote agents can achieve distinct voices by joining the same audio session directly through their own transport instead.
Implementation
LLM agent with TTS
Overridebuild_pipeline() on your LLM agent to add TTS after the LLM:
super().build_pipeline() to get the default LLM pipeline, then append your TTS service.