Skip to main content

Pipecat

Use arctan.pipecat.arctan_enhancer.ArctanAudioFilter as a Pipecat input audio filter.

Requirements

  • Python 3.11 or newer, because Pipecat 1.3 requires it.
  • An Arctan SDK license key.
  • Network access from the agent process for SDK license key validation.

Install

pip install "arctan-vi[pipecat]"

Includes the Arctan SDK and Pipecat integration.

License key

Set the key in the agent environment:

export ARCTAN_SDK_KEY="arc_sk_live_..."

Do not commit SDK license keys or .env files.

If ARCTAN_SDK_KEY is not set, pass license_key when creating the filter.

Add Arctan to transport input

from arctan.pipecat import arctan_enhancer
from pipecat.transports.base_transport import TransportParams

audio_filter = arctan_enhancer.ArctanAudioFilter()

transport_params = TransportParams(
audio_in_enabled=True,
audio_in_filter=audio_filter,
)

Pipecat calls start(sample_rate), filter(audio), process_frame(frame), and stop() through the transport lifecycle.

Pass the SDK license key explicitly

audio_filter = arctan_enhancer.ArctanAudioFilter(
license_key="arc_sk_live_...",
)

license_key overrides ARCTAN_SDK_KEY.

Runtime behavior

The Pipecat adapter:

  • Accepts PCM16 input bytes.
  • Buffers input chunks until complete Arctan processing blocks are ready.
  • Returns b"" when Pipecat provides less than one complete processing block.
  • Returns processed PCM16 bytes for every complete processing block.
  • Clears incomplete buffered audio when processing is bypassed or re-enabled.
  • Raises if filter() is called before start().
  • Raises if input bytes do not contain complete int16 samples.

FilterEnableFrame controls bypass. When disabled, the filter returns input audio unchanged.