Overview
Your user's microphone is likely to pick up undesirable audio including background noise (like traffic, music, voices, etc) and might also pick up echoes from their own speakers. This noise leads to a poor experience for other participants in a call. In voice AI apps, it can also interfere with turn detection or degrade the quality of transcriptions.
LiveKit Cloud includes access to advanced noise cancellation models (Krisp and ai-coustics) so agents receive crystal-clear audio. Audio sent through LiveKit Cloud can use these models regardless of where your agent runs. See Agents for setup.
LiveKit SDKs support WebRTC noise and echo cancellation for conferencing apps via echoCancellation and noiseSuppression in any deployment. WebRTC cancellation runs in the client only, so it applies to conferencing. For agents and telephony (where there is no browser frontend), use the LiveKit Cloud models above. Adjust WebRTC settings with the AudioCaptureOptions type during connection. See WebRTC noise and echo cancellation in the Frontend section for more information.
To hear the effect of enhanced noise cancellation, play the samples below:
Original


Agents
Enhanced noise cancellation is available when you use LiveKit Cloud for realtime transport. The following examples show how to set up noise cancellation inside your agent code. This applies noise cancellation to inbound audio and is the recommended approach for most voice AI use cases. The examples include audio comparisons that show the effect of each model on audio as perceived by a user and by a voice AI agent running an STT model (Deepgram Nova 3 in these samples). Segments marked with a strikethrough indicate unwanted content that would confuse the agent. Try the free noise canceller tool with your LiveKit Cloud account to test your own audio samples.
When using noise or background voice cancellation in the agent code, do not enable noise cancellation models in the frontend. Noise cancellation models are trained on raw audio and might produce unexpected results if the input has already been processed by a noise cancellation model in the frontend.
Standard noise cancellation and the separate echo cancellation feature can be left enabled.
There are two options:
- Krisp: enhanced noise cancellation with optional background voice cancellation and telephony-optimized models.
- ai-coustics: enhanced noise cancellation model tuned for voice and agent use.
Krisp
Krisp provides enhanced noise cancellation and background voice cancellation for agent inbound audio. The models run locally, with no audio data sent to Krisp servers and negligible impact on audio latency or quality.
Original Audio - Noisy Taxi Ride


With Krisp Noise Cancellation (NC)


With Krisp Background Voice Cancellation (BVC)


Model options
| Model | Description |
|---|---|
| NC | Standard enhanced noise cancellation. |
| BVC | Background voice cancellation (NC + removes non-primary voices that would confuse transcription or turn detection). |
| BVCTelephony | Background voice cancellation optimized for telephony applications. |
# NCnoise_cancellation.NC()# BVCnoise_cancellation.BVC()# BVCTelephonynoise_cancellation.BVCTelephony()
import {// NCNoiseCancellation,// BVCBackgroundVoiceCancellation,// BVCTelephonyTelephonyBackgroundVoiceCancellation,} from '@livekit/noise-cancellation-node';
Installation
uv add "livekit-plugins-noise-cancellation~=0.2"
pnpm add @livekit/noise-cancellation-node
Usage
There are two ways to apply the filter: basic (using room options) and custom (using AudioStream).
Use the basic implementation when your agent uses the default session pipeline and you want the same noise cancellation applied to all inbound audio.
Include the filter in the room input options when starting your agent session:
from livekit.agents import room_iofrom livekit.plugins import noise_cancellation# ...await session.start(# ...,room_options=room_io.RoomOptions(audio_input=room_io.AudioInputOptions(noise_cancellation=noise_cancellation.BVC(),),),)# ...
import { BackgroundVoiceCancellation } from '@livekit/noise-cancellation-node';// ...await session.start({// ...,inputOptions: {noiseCancellation: BackgroundVoiceCancellation(),},});// ...
Use the custom implementation when you create an AudioStream from a track yourself (for example in a job with custom track handling or when iterating over frames for STT).
Apply the filter when constructing the stream so that the frames you read are already filtered:
from livekit.rtc import AudioStreamfrom livekit.plugins import noise_cancellationstream = AudioStream.from_track(track=track,noise_cancellation=noise_cancellation.BVC(),)
import { AudioStream } from '@livekit/rtc-node';import { BackgroundVoiceCancellation } from '@livekit/noise-cancellation-node';const stream = new AudioStream(track, {noiseCancellation: BackgroundVoiceCancellation(),});
ai-coustics
ai-coustics provides realtime noise filtering and audio enhancement for agent inbound audio.
The ai-coustics plugin is built for use in the Python and Node.js agents SDK only, and is not supported on clients for video conferencing.
Original Audio - Conversation


With ai-coustics Quail (QUAIL_L)


With ai-coustics Voice Focus (QUAIL_VF_L)


Model options
| Model | Description |
|---|---|
| QUAIL_L | Purpose-built for Voice AI Agents and human-to-machine interactions. Tuned to improve downstream Speech-to-Text (STT) performance rather than general voice enhancement. |
| QUAIL_VF_L | Voice Focus variant that elevates the foreground speaker while suppressing interfering speech and background noise. Higher quality for agent use, but incurs additional cost. |
# QUAIL_Lai_coustics.audio_enhancement(model=EnhancerModel.QUAIL_L)# QUAIL_VF_Lai_coustics.audio_enhancement(model=EnhancerModel.QUAIL_VF_L)
import * as aiCoustics from '@livekit/plugins-ai-coustics';// QUAIL_LaiCoustics.audioEnhancement({ model: EnhancerModel.QUAIL_L })// QUAIL_VF_LaiCoustics.audioEnhancement({ model: EnhancerModel.QUAIL_VF_L })
Installation
uv add "livekit-plugins-ai-coustics"
pnpm add @livekit/plugins-ai-coustics
Usage
There are two ways to apply the filter: basic (using room options) and custom (using AudioStream).
Use the basic implementation when your agent uses the default session pipeline and you want the same noise cancellation applied to all inbound audio.
Include the filter in the room input options when starting your agent session:
from livekit.agents import room_iofrom livekit.plugins import ai_coustics, EnhancerModel# ...await session.start(# ...,room_options=room_io.RoomOptions(audio_input=room_io.AudioInputOptions(noise_cancellation=ai_coustics.audio_enhancement(model=EnhancerModel.QUAIL_L),),),)# ...
import * as aiCoustics from '@livekit/plugins-ai-coustics';// ...await session.start({// ...,inputOptions: {noiseCancellation: aiCoustics.audioEnhancement({ model: "quailL" }),},});// ...
VAD adapter
The ai-coustics plugin also exposes a VAD adapter for turn detection. VAD is built into the ai-coustics model, so you can skip running a separate VAD (such as Silero) entirely.
from livekit.plugins.ai_coustics import audio_enhancement, VAD, EnhancerModelvad=VAD()noise_cancellation=audio_enhancement(model=EnhancerModel.QUAIL_L)
import * as aic from '@livekit/plugins-ai-coustics';vad: aic.vad(),noiseCancellation: aic.audioEnhancement(),
Telephony
Krisp noise cancellation can be applied directly at your SIP trunk for inbound or outbound calls. This uses the standard Krisp noise cancellation (NC) model. Other models are not available for SIP.
Inbound
Include krisp_enabled: true in the inbound trunk configuration.
{"trunk": {"name": "My trunk","numbers": ["+15105550100"],"krisp_enabled": true}}
See the full inbound trunk docs for more information.
Outbound
Include krisp_enabled: true in the CreateSipParticipant request.
request = CreateSIPParticipantRequest(sip_trunk_id = "<trunk_id>",sip_call_to = "<phone_number>",room_name = "my-sip-room",participant_identity = "sip-test",participant_name = "Test Caller",krisp_enabled = True,wait_until_answered = True)
See the full outbound call docs for more information.
Frontend
Noise cancellation in the frontend applies to outbound audio before it is sent to the room.
Krisp
The following examples show how to set up noise cancellation in the frontend using Krisp. This applies noise cancellation to outbound audio. The BVC model is available in the JavaScript frontend; other frontend SDKs support the NC model only.
| Platform | Outbound | 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 |
When using noise or background voice cancellation in the frontend, do not enable Krisp noise cancellation in the agent code. Standard noise cancellation and the separate echo cancellation feature can be left enabled.
Installation
npm install @livekit/krisp-noise-filter
This package includes the Krisp SDK but not the models, which downloads at runtime to minimize the impact on your application's bundle size.
React components usage
LiveKit Components includes a convenient useKrispNoiseFilter hook to easily integrate Krisp into your React app:
import { useKrispNoiseFilter } from '@livekit/components-react/krisp';function MyKrispSetting() {const krisp = useKrispNoiseFilter();return (<inputtype="checkbox"onChange={(ev) => krisp.setNoiseFilterEnabled(ev.target.checked)}checked={krisp.isNoiseFilterEnabled}disabled={krisp.isNoiseFilterPending}/>);}
Base JS SDK usage
For other frameworks or advanced use cases, use the KrispNoiseFilter class directly:
import { type LocalAudioTrack, Room, RoomEvent, Track } from 'livekit-client';const room = new Room();// We recommend a dynamic import to only load the required resources when you enable the pluginconst { KrispNoiseFilter } = await import('@livekit/krisp-noise-filter');room.on(RoomEvent.LocalTrackPublished, async (trackPublication) => {if (trackPublication.source === Track.Source.Microphone &&trackPublication.track instanceof LocalAudioTrack) {if (!isKrispNoiseFilterSupported()) {console.warn('Krisp noise filter is currently not supported on this browser');return;}// Once instantiated, the filter will begin initializing and will download additional resourcesconst krispProcessor = KrispNoiseFilter();console.log('Enabling LiveKit Krisp noise filter');await trackPublication.track.setProcessor(krispProcessor);// To enable/disable the noise filter, use setEnabled()await krispProcessor.setEnabled(true);// To check the current status use:// krispProcessor.isEnabled()// To stop and dispose of the Krisp processor, simply call:// await trackPublication.track.stopProcessor()}});
Available models
The JavaScript noise filter supports the standard Krisp noise cancellation (NC) and background voice cancellation (BVC) models.
Compatibility
Not all browsers support the underlying Krisp SDK (including Safari <17.4). Use isKrispNoiseFilterSupported() to check if the current browser is supported.
Installation
Add the package to your build.gradle file:
dependencies {implementation "io.livekit:krisp-noise-filter:0.0.10"}
Get the latest SDK version number from Maven Central.
Usage
val krisp = KrispAudioProcessor.getInstance(getApplication())coroutineScope.launch(Dispatchers.IO) {// Only needs to be done once.// This should be executed on the background thread to avoid UI freezes.krisp.init()}// Pass the KrispAudioProcessor into the Room creationroom = LiveKit.create(getApplication(),overrides = LiveKitOverrides(audioOptions = AudioOptions(audioProcessorOptions = AudioProcessorOptions(capturePostProcessor = krisp,)),),)// Or to set after Room creationroom.audioProcessingController.setCapturePostProcessing(krisp)
Available models
The Android noise filter supports only the standard Krisp noise cancellation (NC) model.
Installation
Add a new package dependency to your app by URL:
https://github.com/livekit/swift-krisp-noise-filter
Or in your Package.swift file:
.package(url: "https://github.com/livekit/swift-krisp-noise-filter.git", from: "0.0.7"),
Usage
Here is a simple example of a SwiftUI app that uses Krisp in its root view:
import LiveKitimport SwiftUIimport LiveKitKrispNoiseFilter// Keep this as a global variable or somewhere that won't be deallocatedlet krispProcessor = LiveKitKrispNoiseFilter()struct ContentView: View {@StateObject private var room = Room()var body: some View {MyOtherView().environmentObject(room).onAppear {// Attach the processorAudioManager.shared.capturePostProcessingDelegate = krispProcessor// This must be done before calling `room.connect()`room.add(delegate: krispProcessor)// You are now ready to connect to the room from this view or any child view}}}
For a complete example, view the Krisp sample project.
Available models
The Swift noise filter supports only the standard Krisp noise cancellation (NC) model.
Compatibility
- The Krisp SDK requires iOS 13+ or macOS 10.15+.
- If your app also targets visionOS or tvOS, you'll need to wrap your Krisp code in
#if os(iOS) || os(macOS)and add a filter to the library linking step in Xcode.
Installation
npm install @livekit/react-native-krisp-noise-filter
This package includes both the Krisp SDK and the required models.
Usage
import { KrispNoiseFilter } from '@livekit/react-native-krisp-noise-filter';import { useLocalParticipant } from '@livekit/components-react';import { useMemo, useEffect } from 'react';function MyComponent() {let { microphoneTrack } = useLocalParticipant();const krisp = useMemo(() => KrispNoiseFilter(), []);useEffect(() => {const localAudioTrack = microphoneTrack?.audioTrack;if (!localAudioTrack) {return;}localAudioTrack?.setProcessor(krisp);}, [microphoneTrack, krisp]);}
Available models
The React Native noise filter supports only the standard Krisp noise cancellation (NC) model.
Installation
Add the package to your pubspec.yaml file:
dependencies:livekit_noise_filter: ^0.1.0
Usage
import 'package:livekit_client/livekit_client.dart';import 'package:livekit_noise_filter/livekit_noise_filter.dart';// Create the noise filter instancefinal liveKitNoiseFilter = LiveKitNoiseFilter();// Configure room with the noise filterfinal room = Room(roomOptions: RoomOptions(defaultAudioCaptureOptions: AudioCaptureOptions(processor: liveKitNoiseFilter,),),);// Connect to room and enable microphoneawait room.connect(url, token);await room.localParticipant?.setMicrophoneEnabled(true);// You can also enable/disable the filter at runtime// liveKitNoiseFilter.setBypass(true); // Disables noise cancellation// liveKitNoiseFilter.setBypass(false); // Enables noise cancellation
Available models
The Flutter noise filter supports only the standard Krisp noise cancellation (NC) model.
Compatibility
The Flutter noise filter is currently supported only on iOS, macOS, and Android platforms.
WebRTC noise and echo cancellation
As an alternative to Krisp, the LiveKit SDKs support built-in outbound noise and echo cancellation based on the WebRTC implementations of echoCancellation and noiseSuppression. You can adjust these settings with the AudioCaptureOptions type in the LiveKit SDKs during connection. Leaving these WebRTC settings on is strongly recommended when you are not using enhanced noise cancellation (Krisp or ai-coustics).
Original


WebRTC noiseSuppression



