Skip to main content
The KrispFilter is deprecated and will be removed in a future version. Please use the KrispVivaFilter, which is the latest model from Krisp. See the Krisp VIVA guide for more information.

Overview

KrispFilter is an audio processor that reduces background noise in real-time audio streams using Krisp AI technology. It inherits from BaseAudioFilter and processes audio frames to improve audio quality by removing unwanted noise. To use Krisp, you need a Krisp SDK license. Get started at Krisp.ai.
Looking for help getting started with Krisp and Pipecat? Checkout our Krisp noise cancellation guide.

Installation

The Krisp filter requires additional dependencies:
pip install "pipecat-ai[krisp]"

Environment Variables

You need to provide the path to the Krisp model. This can either be done by setting the KRISP_MODEL_PATH environment variable or by setting the model_path in the constructor.

Constructor Parameters

sample_type
str
default:"PCM_16"
Audio sample type format
channels
int
default:"1"
Number of audio channels
model_path
str
default:"None"
Path to the Krisp model file.You can set the model_path directly. Alternatively, you can set the KRISP_MODEL_PATH environment variable to the model file path.

Input Frames

FilterEnableFrame
Frame
Specific control frame to toggle filtering on/off
from pipecat.frames.frames import FilterEnableFrame

# Disable noise reduction
await task.queue_frame(FilterEnableFrame(False))

# Re-enable noise reduction
await task.queue_frame(FilterEnableFrame(True))

Usage Example

from pipecat.audio.filters.krisp_filter import KrispFilter

transport = DailyTransport(
    room_url,
    token,
    "Respond bot",
    DailyParams(
        audio_in_filter=KrispFilter(), # Enable Krisp noise reduction
        audio_in_enabled=True,
        audio_out_enabled=True,
        vad_analyzer=SileroVADAnalyzer(),
    ),
)

Audio Flow

Notes

  • Requires Krisp SDK and model file to be available
  • Supports real-time audio processing
  • Supports additional features like background voice removal
  • Handles PCM_16 audio format
  • Thread-safe for pipeline processing
  • Can be dynamically enabled/disabled
  • Maintains audio quality while reducing noise
  • Efficient processing for low latency