Hi guys, is there any method to change stt provide...
# agents
s
Hi guys, is there any method to change stt provider on the fly? i was initiating a new provider in self._stt to override previous one however does it reliably ensure that new stt instance is being used? @refined-appointment-81829 @lively-winter-88668
also does the session.update_agent() kill the previous agent?
l
You're right to say that the way to switch STT provider entirely is to switch to a different agent. There is a simple demo at https://github.com/livekit-examples/python-agents-examples/blob/main/multi-agent/long_or_short_agent.py showing switching between two agents, you should be able to set one of those with a different STT
s
@lively-winter-88668 if we want the agent to have the same chat_ctx would we have to pass it in the params? secondly does the previous agent config stays active or does it get killed when another agent takes control of the session? TIA
l
if we want the agent to have the same chat_ctx would we have to pass it in the params?
Yes, I saw this example does just that: https://github.com/livekit-examples/python-agents-examples/blob/main/complex-agents/personal_shopper/personal_shopper.py
secondly does the previous agent config stays active or does it get killed when another agent takes control of the session?
If the config is part of the session, like https://github.com/livekit/agents?tab=readme-ov-file#simple-voice-agent, and not overridden by the new agent, then it will stay active. But if overridden, the new config will take effect
🙏 1