astonishing-salesclerk-9701
12/15/2025, 7:07 AMtall-airline-16756
12/15/2025, 7:07 AMtall-airline-16756
12/15/2025, 7:08 AMfrom livekit.plugins import noise_cancellation
from livekit.agents.voice import room_io
await session.start(
room=ctx.room,
agent=agent,
room_options=room_io.RoomOptions(
audio_input=room_io.AudioInputOptions(
noise_cancellation=noise_cancellation.BVC(),
),
),
)
• Node.js example:
import { BackgroundVoiceCancellation } from '@livekit/noise-cancellation-node';
await session.start({
room: ctx.room,
agent: myAgent,
inputOptions: {
noiseCancellation: BackgroundVoiceCancellation(),
},
});
2) Disable frontend noise cancellation if using BVC
• Don’t run frontend NC and BVC at the same time; double-processing can degrade audio quality.
3) Use a reliable VAD (voice activity detection)
• Use a VAD (e.g., Silero) to reduce false speech detections and unnecessary turn interruptions.
4) Telephony note
• For telephony use cases BVC is not available; use the standard NC() model instead.
Would you like instructions for your specific SDK (Web, iOS, Android, or server-side agent) or help adding VAD configuration?
Sources: Enhanced noise cancellation | LiveKit docs | Agent session | LiveKit docs | Turn detection and interruptions | LiveKit Docs | Agent Builder | LiveKit docsrefined-airport-68974
12/15/2025, 10:45 AMtall-airline-16756
12/15/2025, 10:45 AMnoise_cancellation.BVC() (or BackgroundVoiceCancellation() in Node) in your agent session’s room input options. For SIP/telephony participants use the telephony variant (BVCTelephony()).
Would you like the exact code snippet for your SDK (Python, Node, Web, iOS, or Android)?
Sources: Enhanced noise cancellation | LiveKit docs | Gemini Live API plugin | LiveKit docsrefined-airport-68974
12/15/2025, 10:48 AMsession = AgentSession(
llm=google.realtime.RealtimeModel(
model="gemini-2.5-flash-native-audio-preview-12-2025",
# model="gemini-live-2.5-flash-native-audio",
voice="Aoede",
temperature=0.8,
)
)
await session.start(
room=ctx.room,
agent=VoiceAssistant(),
)
what can I add in these two lines that will enhance voice activity detection and noise cancellationtall-airline-16756
12/15/2025, 10:48 AMfrom livekit.plugins import google, silero, noise_cancellation
from livekit.agents.voice import room_io
session = AgentSession(
llm=google.realtime.RealtimeModel(
model="gemini-2.5-flash-native-audio-preview-12-2025",
voice="Aoede",
temperature=0.8,
),
vad=silero.VAD.load(), # improves voice activity / interruption detection
)
await session.start(
room=ctx.room,
agent=VoiceAssistant(),
room_options=room_io.RoomOptions(
audio_input=room_io.AudioInputOptions(
noise_cancellation=noise_cancellation.BVC(), # removes background noise & secondary speakers
),
),
)
Notes:
• Disable any frontend NC if you enable BVC to avoid double-processing.
• For telephony participants use BVCTelephony() instead.
• If you want even better turn detection, I can show how to add a turn detector (e.g., MultilingualModel) and an STT plugin for interim transcripts. Would you like that? Sources: Gemini Live API plugin | LiveKit docs | Enhanced noise cancellation | LiveKit docs | LiveKit turn detector plugin | LiveKit docs | Agent session | LiveKit docsrefined-airport-68974
12/15/2025, 10:53 AMtall-airline-16756
12/15/2025, 10:53 AMvad is not a parameter of RealtimeModel. Pass VAD to AgentSession and put noise cancellation in session.start() room options. Use Silero VAD plus BVC for best results.
Corrected minimal example:
from livekit.agents import AgentSession
from livekit.plugins import google, silero, noise_cancellation
from livekit.agents.voice import room_io
session = AgentSession(
llm=google.realtime.RealtimeModel(
model="gemini-2.5-flash-native-audio-preview-12-2025",
voice="Aoede",
temperature=0.8,
),
vad=silero.VAD.load(), # ← pass VAD here
)
await session.start(
room=ctx.room,
agent=VoiceAssistant(),
room_options=room_io.RoomOptions(
audio_input=room_io.AudioInputOptions(
noise_cancellation=noise_cancellation.BVC(), # ← apply BVC here
),
),
)
Quick tips:
• Disable any frontend NC if you enable BVC to avoid double-processing.
• For telephony participants use BVCTelephony().
• If you want stronger turn-detection later, I can show how to add turn_detection + an STT plugin.
Do you want me to validate your current imports/installed packages or show the commands to download Silero/BVC model weights?
Sources: Enhanced noise cancellation | LiveKit docs