Overview
This guide will walk you through setting up and using Krisp’s VIVA noise cancellation models to filter out background noise and voices from the user’s audio input audio stream. These models yield clearer audio, meaning fewer false interruptions and better transcription.Krisp VIVA API Reference
Pipecat’s API reference for Krisp VIVA noise cancellation
Krisp VIVA Example
Complete example with Krisp VIVA noise cancellation
Prerequisites
To complete this setup, you will need access to a Krisp developers account, where you can download the Python SDK and corresponding VIVA models.Get started on the Krisp developers website.
Setup
Download the Python SDK and Models
- Log in to the Krisp developer portal
- Navigate to the
Server SDK Version
Tab - Find the latest version of the Python SDK:
- Download the SDK
- Download the Server Side Noise Cancellation models
Install the Python wheel file
-
First, unzip the SDK files you downloaded in the previous step. In the unzipped folder, you will find a
dist
folder containing the Python wheel file you will need to install. -
Install the Python wheel file that corresponds to your platform. For example, a macOS ARM64 platform running Python 3.12 would install the following:
Set up the environment variable
-
First, unzip the models you downloaded in the first step. The folder contains a number of models. You will want to use either:
krisp-viva-pro
: Mobile, Desktop, Browser (WebRTC, up to 32kHz)krisp-viva-tel
: Telephony, Cellular, Landline, Mobile, Desktop, Browser (up to 16kHz)
krisp-viva-pro-v1.kef
. -
In your .env file, add a
KRISP_VIVA_MODEL_PATH
environment variable which points to the path to the VIVA model you wish to use.
Test the integration
You’re ready to test the integration! Try running the Krisp VIVA foundation example.Learn how to run foundational
examples
in Pipecat.
Usage Example
TheKrispVivaFilter()
is the audio filter available in Pipecat that uses the Krisp VIVA noise cancellation model. This filter can be added to any transport via the audio_in_filter
parameter.
For example, here’s how to add the KrispVivaFilter()
to a Daily transport: