many-forest-60185
10/28/2025, 7:13 PMtall-airline-16756
10/28/2025, 7:13 PMtall-airline-16756
10/28/2025, 7:13 PMupdate_options() method. For instance, switching to a medical model is as simple as stt.update_options(model="nova-3-medical").
• Switching Between Different Providers: When you want to switch from one provider (like OpenAI) to another (such as Deepgram), a great way to handle this is by using an agent transfer pattern. This means setting up multiple agent classes, each tailored to a specific STT provider, and then transferring the session to the agent that fits your current needs.
If you'd like, I’d be happy to share a code example that demonstrates how to implement the agent transfer pattern for switching STT providers. Just let me know!
Sources: livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/stt.py | Deepgram STT | LiveKit Docs | Speech-to-text (STT) models | LiveKit Docs | basics/say_in_voice.pymany-forest-60185
10/28/2025, 7:15 PMtall-airline-16756
10/28/2025, 7:16 PM@function_tool
async def switch_to_deepgram(self):
return DeepgramAgent() # Handoff triggered
1. Confirm Transition: To make sure the user knows about the switch, use the on_enter() method in the new agent to send a confirmation message. Like this:
async def on_enter(self):
await self.session.say("Now using Deepgram for voice recognition.")
1. Preserve Context: It’s important to keep user preferences or chat history intact. You can do this by using a shared UserData object that’s passed along with the session, ensuring a smooth experience across agents.
If you’d like, I can provide a complete code example tailored to your preferred programming language, such as Python or Node.js. Just let me know!
Sources: Tool definition and use | LiveKit Docs | examples/src/basic_tool_call_agent.ts | complex-agents/role-playing/README.md | Introducing LiveKit Inference: A unified model interface for voice AI | livekit-agents/livekit/agents/inference/stt.py