nice-fish-21757
07/28/2025, 12:15 PMtall-airline-16756
07/28/2025, 12:15 PMtall-airline-16756
07/28/2025, 12:16 PMpip install "livekit-plugins-noise-cancellation~=0.2"
Usage in LiveKit Agents
Include the filter in RoomInputOptions when starting your `AgentSession`:
from livekit.plugins import noise_cancellation
# ...
await session.start(
# ...,
room_input_options=room_io.RoomInputOptions(
noise_cancellation=noise_cancellation.BVC(),
),
)
# ...
Available Models
There are three noise cancellation models available:
• `noise_cancellation.NC()`: Standard enhanced noise cancellation
• `noise_cancellation.BVC()`: Background voice cancellation (removes non-primary voices)
• `noise_cancellation.BVCTelephony()`: Optimized for telephony applications
Recommended Model
For most 1:1 voice AI applications, LiveKit recommends using the BVC model as it removes extra background speakers in addition to background noise, providing the best experience for voice AI applications.
Complete Example
Here’s a complete example:
from livekit.plugins import noise_cancellation
await session.start(
agent=MyAgent(),
room=ctx.room,
room_input_options=RoomInputOptions(
# Enable Krisp BVC noise cancellation
noise_cancellation=noise_cancellation.BVC(),
),
room_output_options=RoomOutputOptions(transcription_enabled=True),
)
Important Note
When using server-side noise or background voice cancellation, client-side noise cancellation should be disabled. Noise cancellation models are trained on raw audio and may produce unexpected results if the input has already been processed on the client.
Compatibility
For LiveKit Agents v0.12, pass the noise_cancellation parameter to the VoicePipelineAgent or MultimodalAgent constructor instead.
Sources: AI noise cancellation | LiveKit Docs | examples/voice_agents/restaurant_agent.py | Audio and video | LiveKit Docs | Enhanced noise cancellation | LiveKit Docsmelodic-vegetable-78787
08/13/2025, 6:51 AMtall-airline-16756
08/13/2025, 6:51 AM