many-forest-60185
09/04/2025, 11:26 AMtall-airline-16756
09/04/2025, 11:26 AMtall-airline-16756
09/04/2025, 11:27 AMnoise_cancellation.NC() or BVC) and frontend Krisp noise cancellation at the same time. Since noise cancellation models are trained on raw audio, feeding them audio that’s already been filtered can lead to some unexpected results.
Here’s what we recommend:
• Pick either frontend Krisp noise cancellation or server-side noise cancellation — using both together isn’t a great idea.
• If you’re working with voice AI applications, server-side BVC is usually the way to go because it effectively removes background noise and other voices, which really helps keep your speech-to-text transcription clean.
Also, feel free to keep standard WebRTC noise suppression and echo cancellation turned on alongside either option. They work at a different level and actually complement the noise cancellation nicely.
Sources: Enhanced noise cancellation | LiveKit Docsmany-forest-60185
09/04/2025, 11:27 AMtall-airline-16756
09/04/2025, 11:28 AMechoCancellation: true and noiseSuppression: true.
• Flutter SDK: These settings come along as part of the media constraints with default values set to true.
• iOS/macOS Swift SDK: Things are a bit different here—Apple’s built-in voice processing is used instead of WebRTC’s, so these features are false by default unless you turn them on yourself.
If you want to enable them manually, no worries! You can easily set the audio capture options when you initialize the microphone. Here’s a quick example:
// JavaScript example
room.localParticipant.setMicrophoneEnabled(true, { echoCancellation: true, noiseSuppression: true });
Feel free to reach out if you'd like me to walk you through the steps for your specific platform—I’m here to help!
Sources: lib/src/track/options.dart | Tests/LiveKitTests/AudioProcessingTests.swift | Noise & echo cancellation | LiveKit Docs | AI voice agents | LiveKit Docs | livekit-android-sdk/src/main/java/io/livekit/android/room/track/LocalAudioT...many-forest-60185
09/04/2025, 11:28 AMtall-airline-16756
09/04/2025, 11:29 AMtall-airline-16756
09/05/2025, 3:06 AMfrom livekit.plugins import noise_cancellation
from livekit.agents import AgentSession, RoomInputOptions
session = AgentSession(
vad=ctx.proc.userdata["vad"],
)
await session.start(
room=ctx.room,
agent=Assistant(),
room_input_options=RoomInputOptions(
noise_cancellation=noise_cancellation.BVC(), # This turns on BVC for inbound audio
),
)
If you hit any bumps or want to chat more about this, just let me know—I’m here to help!
Sources: Enhanced noise cancellation | LiveKit Docs | agent.py