What is a good quality plugin for noise cancelatio...
# ask-ai
d
What is a good quality plugin for noise cancelation ?
t
Thanks for reaching out, W. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! LiveKit brings you top-notch noise cancellation powered by models licensed from Krisp. To make things easier, here are the best plugins for your platform: • Python: Go with
livekit-plugins-noise-cancellation
. If you’re working on voice AI, the Background Voice Cancellation (BVC) model is a great pick. • Node.js: Try out
@livekit/noise-cancellation-node
. • Web (JavaScript): You can use
@livekit/krisp-noise-filter
or the handy
useKrispNoiseFilter
React hook. • Swift: Check out
LiveKitKrispNoiseFilter
. • Android: Use
io.livekit:krisp-noise-filter
. • Flutter: Grab
livekit_noise_filter
. • React Native: Use
@livekit/react-native-krisp-noise-filter
. Just a quick tip: for voice AI apps, it’s best to apply noise cancellation on the agent side (inbound audio) using the BVC model. Try to avoid turning it on in both the frontend and agent code to keep your audio sounding crystal clear. Want to give noise cancellation a spin? You can test it out for free with our noise canceller tool. Have fun experimenting! Sources: pnpm-lock.yaml | Enhanced noise cancellation | LiveKit Docs | avatars/hedra/pipeline_avatar/agent.py | requirements.txt
d
Any opensource and free plugin ?
t
Hey there! Just wanted to share that LiveKit offers enhanced noise cancellation through Krisp, which is free for LiveKit Cloud users, though it’s not open source. On the flip side, there’s also basic noise suppression available via WebRTC APIs (like
noiseSuppression
and
echoCancellation
), which are open source and already built into browser-based apps. Right now, there aren’t any open-source plugins specifically for advanced noise cancellation in LiveKit. But if you’re thinking about adding your own custom open-source solutions (like RNNoise or something similar), LiveKit’s audio processing APIs are there to help you build that out. Would you like me to walk you through how to set up a custom noise filter using these APIs? I’m happy to help! Sources: krisp-minimal/README.md | requirements.txt | requirements.txt | Enhanced noise cancellation | LiveKit Docs | README.md
d
Great! Could you provide the code to integrate it then ?
In python
t
Hey there! LiveKit has some handy built-in noise cancellation features in Python through the
livekit-plugins-noise-cancellation
package. You can easily use pre-built models like
NC()
for standard noise cancellation or
BVC()
if you want to cancel background voices. Here’s a quick example to get you started:
Copy code
from livekit.plugins import noise_cancellation

# Initialize the noise cancellation model
noise_filter = noise_cancellation.BVC()  # Use NC() for standard noise cancellation

# Apply the noise filter in your LiveKit session
# Example: Add this to RoomInputOptions when starting an AgentSession
room_options = RoomInputOptions(noise_cancellation=noise_filter)
If you're thinking about creating a fully custom noise cancellation model, LiveKit doesn’t offer direct Python APIs for that just yet. But no worries—you can preprocess your audio streams outside of LiveKit before sending them in. If you want, I’m here to help walk you through it or answer any questions! Sources: Enhanced noise cancellation | LiveKit Docs