Skip to main content
Text-to-Speech (TTS) transforms written words into spoken audio, allowing your applications to “speak” to users naturally. With the Vision Agents, you can easily add voice capabilities to your video calls and applications, creating experiences where text becomes lifelike speech in real-time.

How does text to speech work?

TTS converts text to PCM audio. In a voice agent, text usually comes from the LLM response; you can also call agent.say() to speak text directly without the LLM.

Using Text-To-Speech with Stream

The Vision Agents SDK routes synthesized audio from the TTS plugin into your Stream call via the agent’s outbound audio track.

Worked example

Let’s walk through a real-world example to see how TTS works in your application. Imagine you’re building a customer support system where callers get placed in a queue. Here’s how TTS makes this experience feel personal and professional: The Scenario: A customer calls your support line and gets placed in a queue. What Happens:
  1. Your system detects the caller and generates a friendly message: “Thank you for calling TechCorp Support. Your estimated wait time is 5 minutes.”
  2. Instead of showing this as text on screen (which the caller can’t see), your TTS plugin converts it to natural speech that sounds like a real person.
  3. The voice speaks directly to the caller through the Stream call, creating an immediate human connection.
  4. As the queue updates, new messages are automatically spoken: “Your wait time is now 3 minutes” or “We’re connecting you to an agent now.”
The Result: Instead of a silent, frustrating wait, customers get a conversational experience that feels like they’re being personally attended to, even when they’re waiting in line.