# Source: https://docs.pipecat.ai/server/utilities/audio/krisp-filter.md

# KrispFilter

> Audio noise reduction filter using Krisp AI technology

<Warning>
  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](/server/utilities/audio/krisp-viva-filter) for more
  information.
</Warning>

## 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](https://krisp.ai/developers/).

<Tip>
  Looking for help getting started with Krisp and Pipecat? Checkout our [Krisp
  noise cancellation guide](/guides/features/krisp).
</Tip>

## Installation

The Krisp filter requires additional dependencies:

```bash  theme={null}
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

<ParamField path="sample_type" type="str" default="PCM_16">
  Audio sample type format
</ParamField>

<ParamField path="channels" type="int" default="1">
  Number of audio channels
</ParamField>

<ParamField path="model_path" type="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.
</ParamField>

## Input Frames

<ParamField path="FilterEnableFrame" type="Frame">
  Specific control frame to toggle filtering on/off

  ```python  theme={null}
  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))
  ```
</ParamField>

## Usage Example

```python  theme={null}
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

```mermaid  theme={null}
graph TD
    A[AudioRawFrame] --> B[KrispFilter]
    B[KrispFilter] --> C[VAD]
    C[VAD] --> D[STT]
```

## 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


---

> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://docs.pipecat.ai/llms.txt