Skip to main content

LiveKit

Use arctan.livekit.arctan_enhancer.noise_canceller() as the LiveKit audio input noise-cancellation processor.

Requirements

  • Python 3.10 or newer.
  • An Arctan SDK license key.
  • Network access from the agent process for SDK license key validation.

Install

pip install "arctan-vi[livekit]"

Includes the Arctan SDK and LiveKit 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 processor.

Add Arctan to the session

from arctan.livekit import arctan_enhancer
from livekit.agents import room_io

await session.start(
agent=Assistant(),
room=ctx.room,
room_options=room_io.RoomOptions(
audio_input=room_io.AudioInputOptions(
noise_cancellation=arctan_enhancer.noise_canceller(),
),
),
)

Pass the SDK license key explicitly

processor = arctan_enhancer.noise_canceller(
license_key="arc_sk_live_...",
)

license_key overrides ARCTAN_SDK_KEY.

Runtime behavior

The LiveKit adapter:

  • Accepts mono and stereo rtc.AudioFrame input.
  • Requires the sample rate to stay stable for the ArctanNoiseCanceller lifetime.
  • Requires each frame to contain a whole number of Arctan processing blocks.
  • Raises an error for channel counts other than mono or stereo.

LiveKit owns the frame processor lifecycle. When your application sets ArctanNoiseCanceller.enabled = False, Arctan returns input frames unchanged.