Krisp noise cancellation
Learn how to integrate Krisp noise cancellation into your Pipecat application
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
- Create a Krisp developers account at krisp.ai/developers
- 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
- Linux:
- Download the corresponding models. We recommend trying the
Background Voice Cancellation
model.
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:
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:
Export the path to your Krisp SDK and model files:
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:
Next, install the pipecat-ai[krisp]
module, which will automatically build the pipecat-ai-krisp
python wrapper module:
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:
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.
After allowing and re-running, you may get a pop-up asking for permission. Select Open Anyway
to run the script.
Usage Example
Here’s a basic example of how to add Krisp noise reduction to your Pipecat pipeline:
Troubleshooting
Common issues and solutions:
- Missing Dependencies
Solution: Ensure you’ve installed with the krisp extra: pip install pipecat-ai[krisp]
- Model Path Not Found
Solution: Set the KRISP_MODEL_PATH
environment variable or provide it in the constructor
- SDK Path Issues
Solution: Verify KRISP_SDK_PATH
points to a valid Krisp SDK installation