steep-balloon-41261
11/10/2025, 1:07 PMtall-airline-16756
11/10/2025, 1:07 PMtall-airline-16756
11/10/2025, 1:08 PMpip install livekit-plugins-turn-detector
pip install livekit-plugins-openai
1. Download Model Files: Next, run this command to download all the necessary model files:
python my_agent.py download-files
1. Configure Azure RealtimeModel: Now, set up your RealtimeModel with your Azure credentials using the with_azure() method like this:
from livekit.plugins.openai.realtime import RealtimeModel
model = RealtimeModel.with_azure(
azure_deployment="gpt-realtime",
azure_endpoint="https://your-endpoint.azure.com",
api_version="2024-10-01-preview",
api_key="your-api-key",
)
1. Set Up Multilingual Turn Detection: For detecting turns in multiple languages, use the MultilingualModel from the turn detector plugin:
from livekit.plugins.turn_detector.multilingual import MultilingualModel
session = AgentSession(
turn_detection=MultilingualModel(),
)
1. Integrate STT: To support multilingual speech-to-text, you can use a model like Deepgram. Here's how you can integrate it:
session = AgentSession(
stt=deepgram.STT(model="nova-3", language="multi"),
llm=RealtimeModel.with_azure(...),
turn_detection=MultilingualModel(),
)
1. Authentication: Lastly, make sure to set your Azure credentials as environment variables in a .env file for smooth authentication:
AZURE_OPENAI_API_KEY=your-api-key
AZURE_OPENAI_ENDPOINT=https://your-endpoint.azure.com
Following these steps will help you build a multilingual agent with precise turn detection and seamless interactions. If you have any questions or run into any issues, please don’t hesitate to reach out—I’m here to help!
Sources: LiveKit turn detector plugin | LiveKit Docs | Azure Speech TTS plugin guide | LiveKit Docs | livekit-plugins/livekit-plugins-azure/README.md | Azure OpenAI Realtime API and LiveKit | LiveKit Docsbetter-sandwich-65834
11/10/2025, 1:14 PMtall-airline-16756
11/10/2025, 1:15 PMMultilingualModel for turn detection. It actually needs an STT (Speech-to-Text) model to work properly because it depends on text transcriptions and language identification from the STT. Without that, the MultilingualModel can’t effectively handle multilingual input.
Also, if you’re using the RealtimeModel, you’ll still need a separate STT plugin to provide the text input needed for turn detection. If you'd like, I’m here to guide you through integrating an STT model or help you explore other setup options. Just let me know!
Sources: LiveKit turn detector plugin | LiveKit Docs | livekit-plugins/livekit-plugins-gladia/livekit/plugins/gladia/stt.pybetter-sandwich-65834
11/10/2025, 1:19 PMllm = RealtimeModel.with_azure(
azure_deployment=agent_settings.LLM_MODEL,
voice=agent_settings.LLM_VOICE,
turn_detection=TurnDetection(
type="semantic_vad",
eagerness="auto",
create_response=True,
interrupt_response=True,
),
)tall-airline-16756
11/10/2025, 1:20 PMturn_detection=None in your RealtimeModel configuration.
2. Next, consider using a separate streaming STT service, like Deepgram, to transcribe the audio and provide the text input needed for turn detection.
3. If you want to take it a step further, you can also integrate LiveKit’s MultilingualModel for more advanced turn detection capabilities.
If you’d like, I’m here to guide you through setting this up or to explore other options together. Just let me know!
Sources: livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/realtime/real... | agents/src/voice/agent_activity.ts | Gemini Live API plugin | LiveKit docs | Building the all-in-one platform for voice AI agents