future-shampoo-29056
09/17/2025, 9:57 AMtall-airline-16756
09/17/2025, 9:57 AMtall-airline-16756
09/17/2025, 9:57 AMagents.vad.VAD (or the equivalent base VAD class in your SDK).
2. Next, implement the abstract stream() method to return an instance of your custom VADStream class, which should inherit from agents.vad.VADStream.
3. Within your VADStream, process the incoming AudioFrame objects, apply your VAD logic, and emit the appropriate VADEvent instances, such as START_OF_SPEECH and END_OF_SPEECH.
4. Finally, configure your agent or session to use your custom VAD instance instead of the default Silero VAD by passing it via the vad parameter in components like AgentSession or VoiceAssistant.
As a helpful tip, the Silero VAD implementation is a great reference to see how audio frames are processed, inference is applied, and events are emitted. You can replace the ONNX model inference logic with your own algorithm while keeping the same event-based streaming interface. If you have any questions along the way, feel free to ask—I'm here to support you!
Sources: AI Voice Assistant Quickstart | LiveKit Docs | Working with plugins | LiveKit Docs | agent/main.py | agents/src/voice/audio_recognition.ts