write cdoe to import bvc noise cancellation and us...
# ask-ai
b
write cdoe to import bvc noise cancellation and use it
t
Thanks for reaching out, Mohammed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To import and use BVC (Background Voice Cancellation) noise cancellation in your LiveKit Python project, follow these steps: 1. *Install the plugin:*`pip install "livekit-plugins-noise-cancellation~=0.2"` 2. *Import and integrate BVC in your agent session:*`from livekit.plugins import noise_cancellation await session.start( # ..., room_input_options=room_io.RoomInputOptions( noise_cancellation=noise_cancellation.BVC(), ), )` If you need a full example or details for a different SDK or workflow, let me know. When using server-side noise or background voice cancellation, make sure to disable client-side noise suppression for best results, as these models work best with unprocessed audio. Sources: Voice AI quickstart | LiveKit Docs | AI noise cancellation | LiveKit Docs
b
do we have any parameters for noise cancellation that we can give?
t
Hey there! Let's break down noise cancellation in LiveKit in a way that's super easy to understand. When you're working with audio streams, you've got a few cool settings you can play with - things like
sample_rate
,
num_channels
, and
frame_size_ms
. But here's the neat part: for the Background Voice Cancellation (BVC) model, it's basically plug-and-play! When you use
noise_cancellation.BVC()
, it automatically applies the smartest, most optimized settings to clean up background voices. Right now, the customization options are pretty straightforward. You can choose between different noise cancellation models like
NC()
,
BVC()
, or
BVCTelephony()
, but that's about it. While you can tweak your audio stream settings, the noise cancellation models themselves come with their own pre-tuned configurations. Got a specific scenario you're working on? I'd love to hear more and help you find the best approach within these options. Just shoot me the details, and we'll figure it out together! Sources: Noise & echo cancellation | LiveKit Docs | livekit-rtc/livekit/rtc/audio_stream.py