Skip to main content

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.

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

  1. Log in to the Krisp developer portal
  2. Navigate to the Server SDK Version Tab
  3. Find the latest version of the Python SDK:
    • Download the SDK
    • Download the Server Side Noise Cancellation models

Install the Python wheel file

  1. 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.
  2. Install the Python wheel file that corresponds to your platform. For example, a macOS ARM64 platform running Python 3.12 would install the following:
    uv pip install /PATH_TO_DOWNLOADED_SDK/krisp-audio-sdk-python-1.4.0/dist/krisp_audio-1.4.0-cp312-cp312-macosx_12_0_arm64.whl
    

Set up the environment variable

  1. 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)
    Note: the full model name will be in the format of krisp-viva-pro-v1.kef.
  2. 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.
KRISP_VIVA_MODEL_PATH=/PATH_TO_UNZIPPED_MODELS/krisp-viva-models-9.9/krisp-viva-pro-v1.kef

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

The KrispVivaFilter() 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:
from pipecat.audio.filters.krisp_viva_filter import KrispVivaFilter
from pipecat.transports.daily.transport import DailyParams, DailyTransport

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