Skip to main content
The Voice Agent orchestrates the complete voice interaction pipeline: VAD → STT → LLM → TTS. It provides a unified API for building voice assistants, hands-free interfaces, and conversational AI.

Overview

The Voice Agent handles:
  • VAD: Detects when the user starts/stops speaking
  • STT: Transcribes speech to text
  • LLM: Generates AI responses
  • TTS: Synthesizes speech from responses

Quick Start

The simplest voice pipeline uses each component individually: record → transcribe → generate → speak.

Using VoiceAgentConfiguration

For a more integrated approach with VAD configuration:

Configuration

VoiceAgentConfiguration

Initialize with Pre-loaded Models

If you’ve already loaded models, use:

VoiceAgentResult

Component State

Check readiness of individual components:

ComponentLoadState

Individual Operations

Use components separately when needed:

Complete Voice Assistant

Conversation Context

Maintain conversation history for context-aware responses:

Error Handling

Cleanup

Always clean up when done:

Best Practices

Load all models during app initialization to avoid delays during conversation.
Properly handle audio session interruptions (phone calls, etc.).
Show clear visual indicators for listening, processing, and speaking states.
Implement graceful error recovery to maintain conversation flow.

VAD

Voice Activity Detection →

STT

Speech-to-Text →