Overview

This guide will walk you through setting up and using Krisp’s noise reduction capabilities in your Pipecat application. Krisp provides professional-grade noise cancellation that can significantly improve audio quality in real-time communications. To use Krisp’s noise cancellation, you’ll need to obtain their SDK and models through a Krisp developer account. Our Pipecat Krisp module simplifies the integration process, which we’ll cover in this guide.

Walkthrough

Get Access to Krisp SDK and Models

  1. Create a Krisp developers account at krisp.ai/developers
  2. Download the Krisp Desktop SDK (v7) that matches your platform:
    • Linux: Desktop SDK v7.0.2: Linux
    • macOS (ARM): Desktop SDK v7.0.1: Mac ARM
    • macOS (Intel): Desktop SDK v7.0.1: Mac Intel
    • Windows(ARM): Desktop SDK v7.0.2: Windows ARM
    • Windows (x64): Desktop SDK v7.0.2: Windows
  3. Download the corresponding models. We recommend trying the Background Voice Cancellation model. Recommended model for each platform:
    • Linux (ARM): hs.c6.f.s.de56df.kw
    • Mac (ARM): hs.c6.f.s.de56df.kw
    • Linux (x86_64): hs.c6.f.s.de56df.kw
    • Mac (x86_64): hs.c6.f.s.de56df.kw
    • Windows (x86_64): hs.c6.f.s.de56df.kw
Krisp SDK Portal

Install build dependencies

The pipecat-ai-krisp module is a python wrapper around Krisp’s C++ SDK. To build the module, you’ll need to install the following dependencies:
# Using Homebrew
brew install cmake pybind11
For Windows users: Make sure you have Visual Studio installed with C++ development tools, or alternatively, have the Visual C++ Build Tools installed.

Install the pipecat-ai-krisp module

In your Pipecat repo, activate your virtual environment:
python3 -m venv venv
source venv/bin/activate
Export the path to your Krisp SDK and model files:
# Add to your .env file or shell configuration
export KRISP_SDK_PATH=/PATH/TO/KRISP/SDK
export KRISP_MODEL_PATH=/PATH/TO/KRISP/MODEL.kef
When selecting a KRISP_MODEL_PATH, ensure that you’re selecting the actual model file, not just the directory. The path should look something like this:
export KRISP_MODEL_PATH=./krisp/hs.c6.f.s.de56df.kw
Next, install the pipecat-ai[krisp] module, which will automatically build the pipecat-ai-krisp python wrapper module:
pip install "pipecat-ai[krisp]"

Test the integration

You can now test the Krisp integration. The easiest way to do this is to run the foundational example: 07p-interruptible-krisp.py.
You can run a foundational example by running the following command:
python examples/foundational/07p-interruptible-krisp.py -u YOUR_DAILY_ROOM_URL

Important for macOS users

If you’re running on macOS you may receive a security warning about running the script. This is expected. You can allow access by going to System Settings > Privacy & Security then click Allow Anyway to permit the example to run.
Security & Privacy
After allowing and re-running, you may get a pop-up asking for permission. Select Open Anyway to run the script.
Open Anyway

Usage Example

Here’s a basic example of how to add Krisp noise reduction to your Pipecat pipeline:
from pipecat.audio.filters.krisp_filter import KrispFilter
from pipecat.transports.services.daily import DailyParams, DailyTransport

# Add to transport configuration
transport = DailyTransport(
    room_url,
    token,
    "Audio Bot",
    DailyParams(
        audio_in_filter=KrispFilter(),  # Enable Krisp noise reduction
        audio_in_enabled=True,
        audio_out_enabled=True,
        vad_analyzer=SileroVADAnalyzer(),
    ),
)

Troubleshooting

Common issues and solutions:
  1. Missing Dependencies
Error: Missing module: pipecat_ai_krisp
Solution: Ensure you’ve installed with the krisp extra: pip install "pipecat-ai[krisp]"
  1. Model Path Not Found
Error: Model path for KrispAudioProcessor must be provided
Solution: Set the KRISP_MODEL_PATH environment variable or provide it in the constructor
  1. SDK Path Issues
Error: Cannot find Krisp SDK
Solution: Verify KRISP_SDK_PATH points to a valid Krisp SDK installation

Additional Resources