it's seem google.beta gemini tts is not streaming,...
# ask-ai
a
it's seem google.beta gemini tts is not streaming, how can I stream it
t
Thanks for reaching out, jullajak. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're right to expect streaming — the Google Gemini TTS plugin streams when used correctly. To get streaming working, try one of these options depending on how you’re using it: • If you're using an AgentSession (recommended): set
tts=google.beta.GeminiTTS(...)
when creating the session. The plugin will stream audio automatically as the agent processes incremental text.
Copy code
from livekit.plugins import google
  from livekit.agents import AgentSession

  session = AgentSession(
      tts=google.beta.GeminiTTS(
          model="gemini-2.5-flash-preview-tts",
          voice_name="Zephyr",
          instructions="Speak in a friendly and engaging tone.",
      ),
      # llm, stt, etc.
  )
• If you're using the TTS standalone: call the TTS instance's
stream()
method to receive audio chunks incrementally and play/pipe them as they arrive. If streaming still doesn't occur, check: • You are sending text incrementally (not only a single full string) so the engine can emit partial audio. • Your agent or client pipeline is set to consume and play audio chunks as they arrive (default AgentSession behavior handles this). Do you want the standalone
stream()
example code for consuming audio chunks, or can you share whether you’re using AgentSession or calling the TTS directly? Sources: Gemini TTS plugin guide | LiveKit Docs | Text-to-speech (TTS) models | LiveKit Docs