Skip to main content
Streaming TTS generates audio in chunks, enabling playback to begin before the entire text is synthesized. This is ideal for long content where you want immediate audio feedback.

Basic Usage

Method Signature

Parameters

Returns

TTSOutput with the complete synthesized audio after streaming completes.

Streaming Audio Player

Build a player that handles streaming audio chunks:

SwiftUI Integration

Sentence-by-Sentence Streaming

For natural pauses, split text into sentences:

Buffered Streaming

Buffer chunks for smoother playback:

Use Cases

Stream long-form content with immediate playback.
Stream LLM responses as they’re generated.
Read screen content aloud as user navigates.

Error Handling

Performance Tips

Buffer before playing: Wait for a few chunks before starting playback to avoid stuttering.
Match sample rates: Ensure your audio player’s sample rate matches the TTS output (typically 22050 Hz).

synthesize()

Non-streaming synthesis →

Voices

Available voices →