Overview
LiveKit cloud offers access to advanced models licensed from Krisp to remove background noise and ensure the best possible audio quality. The models run locally, with no audio data sent to Krisp servers as part of this process and negligible impact on audio latency or quality.
The filter is available in either an outbound configuration (where noise is removed by the sender) or in an inbound configuration (where noise is removed by the receiver).
Background voice cancellation (BVC) is available for inbound server-side SDKs, such as Python. This model removes extra background speakers in addition to background noise, providing the best possible experience for voice AI applications.
For most 1:1 voice AI applications, LiveKit recommends using the BVC model in the LiveKit Agents Python SDK as the most effective solution.
Here is a comparison to illustrate the improvement over standard WebRTC noise suppression:
Supported platforms
Consult the following table for a complete overview of feature support.
Platform | Outbound | Inbound | BVC | Package |
---|---|---|---|---|
Web | ✅ | ❌ | ❌ | @livekit/krisp-noise-filter |
Swift | ✅ | ❌ | ❌ | LiveKitKrispNoiseFilter |
Android | ✅ | ❌ | ❌ | io.livekit:krisp-noise-filter |
Flutter | ✅ | ❌ | ❌ | livekit_noise_filter |
React Native | ✅ | ❌ | ❌ | @livekit/react-native-krisp-noise-filter |
Unity | ❌ | ❌ | ❌ | N/A |
Python | ❌ | ✅ | ✅ | livekit-plugins-noise-cancellation |
Node.js | ❌ | ❌ | ❌ | N/A |
Telephony | ✅ | ✅ | ❌ | LiveKit SIP documentation |
Usage instructions
Use the following instructions to integrate the filter into your app.
Installation
Install the noise cancellation package from PyPI:
pip install livekit-plugins-noise-cancellation
Usage in LiveKit Agents
Include the filter in the constructor for VoicePipelineAgent
or MultimodalAgent
:
from livekit import agentsfrom livekit.plugins import noise_cancellation# For voice pipeline agentpipeline_agent = agents.pipeline.VoicePipelineAgent(# ...,noise_cancellation=noise_cancellation.BVC())# For multimodal agentmultimodal_agent = agents.multimodal.MultimodalAgent(# ...,noise_cancellation=noise_cancellation.BVC())
Usage with AudioStream
Apply the filter to any individual inbound AudioStream:
stream = rtc.AudioStream.from_track(track=track,noise_cancellation=noise_cancellation.NC(),)
Available models
There are two noise cancellation models available:
# Standard enhanced noise cancellationnoise_cancellation.NC()# Background voice cancellation (NC + removes non-primary voices# that would confuse transcription or turn detection)noise_cancellation.BVC()
Compatibility
The Python noise filter is currently supported only on Mac and Linux platforms.