i am using this return google.beta.GeminiTTS( m...
# ask-ai
f
i am using this return google.beta.GeminiTTS( model="gemini-2.5-flash-preview-tts", voice_name="Zephyr", ), but getting this error if not activity.tts.capabilities.streaming:\n ^^^^^^^^^^^^^^^^^^^^^^^^^\nAttributeError: \'tuple\' object has no attribute \'capabilities\'' pid=17935 room=47928a54-a4ab-4b21-8cf0-c0fea458b247
t
Thanks for reaching out, Vishalli. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're returning a tuple instead of the
GeminiTTS
instance. That trailing comma after the call turns the return value into a single-element tuple, so
activity.tts
becomes a tuple and has no
capabilities
attribute. Fix: remove the trailing comma. Example—change this:
Copy code
return google.beta.GeminiTTS(
  model="gemini-2.5-flash-preview-tts",
  voice_name="Zephyr",
),
to this:
Copy code
return google.beta.GeminiTTS(
  model="gemini-2.5-flash-preview-tts",
  voice_name="Zephyr"
)
If you still see the error after that, share the surrounding function (how you construct/return
tts
and how
activity
is built) and I’ll help further. Sources: Gemini TTS plugin guide | LiveKit Docs
f
if not activity.tts.capabilities.streaming: ^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'tuple' object has no attribute 'capabilities' [livekit
t
You're still returning a tuple instead of the
GeminiTTS
object — the trailing comma after the constructor makes the return value a single-element tuple, so
activity.tts
is a tuple and has no
.capabilities
. Remove the comma so the function returns the instance directly:
Copy code
# Wrong — returns a tuple
return google.beta.GeminiTTS(
  model="gemini-2.5-flash-preview-tts",
  voice_name="Zephyr",
),

# Right — returns the GeminiTTS object
return google.beta.GeminiTTS(
  model="gemini-2.5-flash-preview-tts",
  voice_name="Zephyr"
)
If you already removed the comma and still get the error, please paste the surrounding function that builds/returns
tts
and how
activity
is assembled and I’ll help debug further.