i have an issue where i’m trying to use update_opt...
# ask-ai
m
i have an issue where i’m trying to use update_options to dynamically change the voice ID of a Cartesia TTS model but it is activating one turn behind. Any thoughts?
t
Thanks for reaching out, Alexander. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I hear you’re seeing the Cartesia TTS voice change apply one turn late when using
update_options
. That behavior is expected:
update_options
changes apply to subsequent utterances, not the current or already-queued synthesis. What you can do • Call
update_options
before you trigger the TTS for the turn that should use the new voice. • If the voice change is driven by user input or a state change, invoke
update_options
immediately when that event is detected, prior to any
generate_reply
/ synthesis call. What I can help with next • If you’d like, share a short snippet of the code sequence where you call
update_options
and then generate speech (language and minimal lines). I’ll point out exactly where to move the call so the new voice takes effect immediately. Sources: Hume TTS plugin guide | LiveKit Docs | Tool definition and use | LiveKit docs | Cartesia TTS plugin guide | LiveKit docs