> ## Documentation Index
> Fetch the complete documentation index at: https://daily-main.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# pipecat-effects

> Audio effects for the output of a pipecat bot

export const CommunityMaintained = ({maintainer, maintainerUrl, repo}) => <Note>
    <strong>Community-maintained integration.</strong> This service is built and
    maintained by{" "}
    <a href={maintainerUrl} target="_blank" rel="noreferrer">
      {maintainer}
    </a>
    . Pipecat does not test or officially support it. Please report issues and
    request changes on the{" "}
    <a href={repo} target="_blank" rel="noreferrer">
      source repository
    </a>
    . Learn more about{" "}
    <a href="/api-reference/server/services/community-integrations">
      community integrations
    </a>
    .
  </Note>;

<CommunityMaintained maintainer="Softcery" maintainerUrl="https://github.com/softcery" repo="https://github.com/softcery/pipecat-effects" />

## Overview

`EffectsFilter` is a `BaseAudioFilter` that runs a chain of effects on the
output audio of a bot, the speech the TTS produces. You build the chain from 8
effects: `Gain`, `Biquad`, `Saturation`, `Compressor`, `AGC`, `Limiter`,
`Reverb` and `DeEsser`. The chain adds no latency.

Pipecat 1.10.0 has no output filter field, so `FilterMixer`, a
`BaseAudioMixer`, runs the filter as the output mixer. It also meters each
chunk and gives loudness in LUFS and true peak in dBTP per read.

<CardGroup cols={2}>
  <Card title="Source Repository" icon="github" href="https://github.com/softcery/pipecat-effects">
    Source code, examples, clips and issues
  </Card>

  <Card title="PyPI Package" icon="cube" href="https://pypi.org/project/pipecat-effects/">
    The `pipecat-effects` package on PyPI
  </Card>
</CardGroup>

## Installation

This is a community-maintained package distributed separately from `pipecat-ai`:

```bash theme={null}
uv add pipecat-effects
```

## Prerequisites

None. The package needs no account, API key or environment variable. It runs
on numpy and scipy.

## Configuration

<ParamField path="effects" type="Sequence[Effect]" required>
  The chain, in order. Each effect validates its values at build time. End the
  chain with `Limiter`, or the int16 cast hard clips.
</ParamField>

<ParamField path="channels" type="int" required>
  The `audio_out_channels` value of the transport. `FilterMixer.start` raises
  over 1 channel.
</ParamField>

Two stock frames change the chain at runtime. `MixerEnableFrame(enable=False)`
bypasses it. `MixerUpdateSettingsFrame(settings={"effects": ...})` swaps in a
new chain. Each change fades over one chunk.

## Usage

```python theme={null}
from pipecat.transports.base_transport import TransportParams
from pipecat_effects import AGC, Biquad, Compressor, EffectsFilter, FilterMixer, Limiter

CHAIN = (
    AGC(target_lufs=-20.0),
    Biquad(kind="highpass", hz=90.0),
    Compressor(threshold_db=-20.0, ratio=3.0, makeup_db=2.0),
    Limiter(ceiling_db=-1.0),
)

params = TransportParams(
    audio_in_enabled=True,
    audio_out_enabled=True,
    audio_out_channels=1,
    audio_out_mixer=FilterMixer(EffectsFilter(CHAIN), channels=1),
)
```

`examples/bot.py` in the repository runs one voice bot with an 8 stage chain.
The README plays 5 clips, one unprocessed and 4 chains, with the loudness of
each.

## Compatibility

Tested with Pipecat v1.10.0. Check the [source
repository](https://github.com/softcery/pipecat-effects) for the latest tested
version and changelog.
