How can I leverage `update_options` to update cert...
# ask-ai
c
How can I leverage
update_options
to update certain params within TTS or STT providers for agent session?
t
Thanks for reaching out, Purna. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how to use
update_options
to change TTS or STT provider parameters during an agent session — specifically which params can be changed and how those changes take effect. Below are concise examples and key facts. TTS (example — Hume) • Call
update_options
on the session's
tts
object. • Pass the same named parameters the provider supports (e.g.,
voice
,
description
,
speed
). • Changes apply to subsequent utterances, not retroactively. Example:
Copy code
session.tts.update_options(
  voice=hume.VoiceByName(name="Colton Rivers", provider=hume.VoiceProvider.hume),
  description="Calm, serene tone",
  speed=2,
)
STT (example — Gladia) • Call
update_options
on the session's
stt
object. • Pass provider-supported params (e.g.,
languages
,
translation_enabled
,
translation_target_languages
). • Changes take effect for future transcription segments. Example:
Copy code
gladia_stt = gladia.STT()
gladia_stt.update_options(
  languages=["ja", "en"],
  translation_enabled=True,
  translation_target_languages=["fr"]
)
Quick notes •
update_options
accepts the same parameters as the provider constructor. • Not every provider supports every parameter — use the provider’s plugin reference for the exact option names. • Would you like examples for a different TTS/STT provider or help applying this inside your existing agent-session code? Sources: Hume TTS plugin guide | LiveKit Docs | Gladia STT plugin guide | LiveKit Docs