able-jackal-84140
06/25/2025, 1:19 PMtall-airline-16756
06/25/2025, 1:19 PMtall-airline-16756
06/25/2025, 1:19 PMstreaming=True
attribute in TTS capabilities indicates whether a Text-to-Speech (TTS) service supports streaming, typically using websockets. If a TTS implementation does not support streaming, attempting to use the stream()
method will result in a NotImplementedError
. This allows you to determine if streaming functionality is available for a specific TTS service.
Sources: livekit.agents.tts API documentationable-jackal-84140
06/25/2025, 1:21 PMtall-airline-16756
06/25/2025, 1:21 PMstreaming=True
magic for you in a friendly way 😊 The streaming=True
attribute in TTS (Text-to-Speech) is like having a real-time audio translator that works as you're speaking. Instead of waiting for the whole message to be processed, it starts generating audio chunks right away. Think of it like subtitles appearing while someone is still talking - cool, right? This method uses websockets to send audio frames bit by bit, along with partial text results through the delta_text
field. The neat part is tracking these pieces with segment_id
, so you know exactly where in the conversation each audio bit belongs. Fields like is_final
help signal when a complete thought has been synthesized. Basically, it means you get audio generation happening live, in real-time, as the text is being processed. No more waiting around for the entire script to be ready - you get instant, dynamic audio synthesis! 🎉 Sources: GitHub::livekit::agents | livekit-agents/livekit/agents/tts/tts.py | GitHub::livekit::livekit_composite | livekit/agents/livekit-agents/livekit/...