LiveKit has offered built-in noise cancellation capabilities provided by libwebrtc since its inception. While this works well in the majority of cases, there are scenarios where more advanced noise cancellation is required.
For LiveKit Cloud customers, we have partnered with Krisp to enhance your users' experience with advanced noise cancellation capabilities. Krisp is a leader in AI-driven noise suppression technology
LiveKit's Krisp Noise Filter
LiveKit's Krisp Noise Filter currently supports our Web, Android, and iOS SDKs. Due to limitations in Krisp's SDK, it is not yet compatible with Safari browsers.
We plan to extend support to additional platforms in the future.
Installation
npm install @livekit/krisp-noise-filter
Usage
Once installed, import and enable it in your client codebase
import { Room, Track, RoomEvent } from 'livekit-client';const room = new Room();// we recommend a dynamic import in order to only load the required resources once you actually 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("enhanced 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 enhanced noise filter");await trackPublication.track.setProcessor(krispProcessor);// once you want to stop the krisp processor, simply call// await trackPublication.track.stopProcessor()}});