salmon-belgium-62133
11/03/2025, 8:36 AMtall-airline-16756
11/03/2025, 8:36 AMtall-airline-16756
11/03/2025, 8:36 AMVAD interface and then pass it to the AgentSession. I’m here to help you through the steps:
To implement your custom VAD:
1. Create a class that inherits from the agents.vad.VAD base class.
2. Implement the necessary methods, especially stream().
3. Pass your custom VAD instance to AgentSession using the vad parameter.
Here’s a simple example to guide you:
session = AgentSession({
vad: your_custom_vad_instance,
stt: new deepgram.STT(),
llm: new openai.LLM(),
tts: new elevenlabs.TTS(),
})
Also, LiveKit provides other turn detection options like STT-based detection, realtime LLM-based detection, manual turn control, and a turn detector model. If you'd like, I’d be happy to share more details or assist you with your custom VAD setup. Just let me know!
Sources: README.md | Turn detection and interruptions | LiveKit Docs | livekit-agents/livekit/agents/voice/agent.py | Silero VAD plugin | LiveKit docs | LiveKit turn detector plugin | LiveKit Docs