breezy-city-58391
10/13/2025, 10:21 AMtall-airline-16756
10/13/2025, 10:22 AMtall-airline-16756
10/13/2025, 10:22 AMRoomInputOptions class with the Background Voice Cancellation (BVC) model—it works wonders for reducing noise, especially in busy, multi-speaker settings.
• Make sure noise cancellation is applied only in the agent code (inbound processing) and not at the same time in the frontend (outbound processing), so they don’t interfere with each other.
• Keep your SDK version and noise cancellation plugin updated to enjoy the best and latest improvements.
• Give real-world audio a try with handy tools like the noise canceller tool to see how it performs.
If you’re still noticing some unwanted noise, it might help to check that dual Krisp-based filtering isn’t enabled and that the BVC model is set up correctly in your agent code. Please feel free to reach out if you’d like me to walk you through any of these steps—I’m here to help!
Sources: Enhanced noise cancellation | LiveKit Docs | SIP troubleshooting guide | LiveKit Docsbreezy-city-58391
10/13/2025, 10:23 AMtall-airline-16756
10/13/2025, 10:23 AMfrom livekit.plugins import noise_cancellation
await session.start(
room=ctx.room,
agent=Assistant(),
room_input_options=RoomInputOptions(
noise_cancellation=noise_cancellation.BVC(),
),
)
Node.js:
import { noiseCancellation } from "@livekit/noise-cancellation-node";
await session.start({
room,
agent,
roomInputOptions: {
noiseCancellation: noiseCancellation.BVC(),
}
});
Just a quick reminder to make sure you have the right noise cancellation plugin installed for your language:
• For Python: livekit-plugins-noise-cancellation
• For Node.js: @livekit/noise-cancellation-node
If anything feels unclear or if you'd like me to walk you through any part of this, please don't hesitate to ask. I'm here to help!breezy-city-58391
10/13/2025, 10:24 AMtall-airline-16756
10/13/2025, 10:25 AMechoCancellation is enabled in AudioCaptureOptions. This helps prevent the agent from picking up its own audio output.
• Test with Noise Canceller Tool: You might find it helpful to try the noise canceller tool to test your audio samples. Comparing results with and without BVC can give us more insight.
• Network and Connectivity: Sometimes, unstable network conditions can impact audio quality. Ensuring a strong and stable connection might reduce disruptions.
• Model Selection: Please confirm you’re using the BVC model, which is the most advanced option for voice AI noise suppression. Other models like NC or Krisp might not perform as well.
If you’re still facing issues after trying these steps, just let me know. I’m here to help, and we can look into other solutions or escalate this for a deeper investigation if needed.
Sources: Enhanced noise cancellation | LiveKit Docs | agent.py | agent/main.py | README.md | krisp-minimal/README.mdbreezy-city-58391
10/13/2025, 10:28 AMtall-airline-16756
10/13/2025, 10:28 AMechoCancellation! Could you please let me know which SDK you're using (like Python, Node.js, Flutter, JS, Swift, or something else)? That way, I can guide you through the exact steps tailored just for you.
Sources: Noise & echo cancellation | LiveKit Docs | SIP troubleshooting guide | LiveKit Docs | Enhanced noise cancellation | LiveKit Docs | lib/src/track/options.dart | src/room/track/options.tsbreezy-city-58391
10/13/2025, 10:28 AMtall-airline-16756
10/13/2025, 10:29 AMechoCancellation setting is usually handled on the frontend or client-side, since it’s part of the WebRTC audio capture process. If you’re using LiveKit’s server-side agent, this setting isn’t something you can adjust directly in the agent code.
To make sure echo cancellation is working well, please check that your frontend application—like your browser or client SDK—has echoCancellation enabled in its audio capture options. For example, in a WebRTC-based frontend, you can set it up like this:
audioOptions = {
"echoCancellation": True,
"noiseSuppression": True,
"autoGainControl": True
}
If you’re noticing echo issues on the agent side, it’s a good idea to double-check that the frontend is sending clean audio with echo cancellation turned on. Feel free to reach out if you’d like me to explain anything further or help you troubleshoot!breezy-city-58391
10/13/2025, 10:29 AMtall-airline-16756
10/13/2025, 10:30 AMlivekit-components/react, echo cancellation is actually enabled by default thanks to WebRTC's AudioCaptureOptions. So, in most cases, you won’t need to do anything extra unless you want to customize it specifically.
If you’re setting up a Room manually, here’s a friendly reminder on how to make sure echo cancellation is turned on:
import { Room } from 'livekit-client';
const room = new Room({
audioCaptureOptions: {
echoCancellation: true,
noiseSuppression: true,
sampleRate: 48000,
audioMode: 'stereo',
},
});
Also, when using server-side noise cancellation like BVC, it’s important to keep echo cancellation enabled to avoid the agent picking up its own audio output. If you have any more questions or need a hand with this, just let me know—I’m here to help!
Sources: components/room.tsx | Enhanced noise cancellation | LiveKit Docs | Noise & echo cancellation | LiveKit Docs | Sources/LiveKit/Types/Options/AudioCaptureOptions.swift | Operational Guidance & Best Practices | livekit/livekit_composite | DeepWik...billowy-lawyer-17667
10/29/2025, 10:17 AMtall-airline-16756
10/29/2025, 10:18 AMkrisp_enabled: true in your SIP trunk configuration like this:
{
"inbound_addresses": [
"192.0.2.0/24"
],
"inbound_numbers_regex": "\\+1-510-555-0100",
"krisp_enabled": true
}
• For outbound calls, just include krisp_enabled: true in your CreateSipParticipant request:
{
"from": "+1234567890",
"to": "+0987654321",
"room_name": "my-room",
"krisp_enabled": true
}
This way, Krisp will help clean up the audio coming from your SIP endpoint.
2. Echo and Basic Noise Suppression
• Good news! LiveKit automatically applies WebRTC-based echo cancellation and noise suppression for all participants by default.
• If you want more advanced control, you can use the AudioProcessingModule in your server-side agent code to process audio streams. Here’s how you can do it:
from livekit.rtc import AudioProcessingModule, AudioFrame
apm = AudioProcessingModule(
echo_cancellation=True,
noise_suppression=True,
auto_gain_control=True
)
# Process audio from microphone (near-end)
audio_frame = AudioFrame(...)
apm.process_stream(audio_frame)
# Process speaker output (far-end) for echo reference
speaker_frame = AudioFrame(...)
apm.process_reverse_stream(speaker_frame)
# Set estimated delay between streams
apm.set_stream_delay_ms(50)
3. A Couple of Helpful Notes
• Be sure not to apply krisp_enabled twice — for example, both in the SIP config and the agent processing.
• The AudioProcessingModule gives you full control over echo, noise, and gain adjustments if you need it.
If anything feels unclear or you’d like a hand with the implementation, please don’t hesitate to ask. I’m here to support you every step of the way!
Sources: livekit-agents/livekit/agents/voice/chat_cli.py | README.md | Enhanced noise cancellation | LiveKit docs | livekit-rtc/livekit/rtc/_proto/track_pb2.pyi | examples/local_audio/src/main.rsbillowy-lawyer-17667
10/29/2025, 10:23 AMtall-airline-16756
10/29/2025, 10:24 AM