Skip to main content

Arctan Voice Isolation for voice agents

Project description

Arctan Voice Isolation

Arctan Voice Isolation is a Python SDK for real-time voice isolation in voice agents and audio pipelines.

The SDK supports:

  • standard Numpy audio processing
  • LiveKit audio input processing
  • Pipecat audio input filtering

An Arctan SDK key is required before audio can be processed.

Installation

Install the base SDK:

pip install arctan-vi

Install with framework adapters:

pip install "arctan-vi[livekit]"
pip install "arctan-vi[pipecat]"

The base SDK and LiveKit adapter support Python 3.10+. The Pipecat adapter requires Python 3.11+.

Set your SDK key in the runtime environment:

export ARCTAN_SDK_KEY="arc_sk_live_..."

You can also pass license_key="arc_sk_live_..." directly to the processor or adapter constructors. An explicit license_key takes precedence over ARCTAN_SDK_KEY.

Standard Python

Use arctan.Processor when you already have audio as NumPy arrays.

import numpy as np
import arctan

config = arctan.ProcessorConfig(sample_rate=24000, num_channels=1)
processor = arctan.Processor(config=config)

try:
    audio = np.zeros((config.num_channels, config.num_frames), dtype=np.float32)
    enhanced = processor.process(audio)
finally:
    processor.close()

Processor.process() accepts float32 audio shaped as channels x frames. Samples must be finite and in [-1.0, 1.0]. The output is a new float32 array with the same shape.

Mono and stereo input are supported. Stereo input is downmixed for voice isolation and returned as dual-mono stereo. The sample rate must remain stable for the lifetime of a processor.

If num_frames is omitted, initialization fills it with the native frame size for the selected sample rate. If you set num_frames, it must contain a whole number of native processing blocks.

LiveKit

Install the LiveKit extra:

pip install "arctan-vi[livekit]"

Create an Arctan noise-cancellation processor and pass it to LiveKit audio input options:

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(),
        ),
    ),
)

You can pass SDK options directly to Arctan:

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

LiveKit mono and stereo frames are supported. Stereo frames are downmixed for voice isolation and returned as dual-mono stereo. The sample rate must remain stable, and each input frame must contain a whole number of native processing blocks.

Pipecat

Install the Pipecat extra:

pip install "arctan-vi[pipecat]"

Create an ArctanAudioFilter and pass it as the input audio filter for your transport:

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,
)

ArctanAudioFilter implements Pipecat's BaseAudioFilter. Pipecat calls start(sample_rate), filter(audio), and stop() through the transport lifecycle.

The Pipecat adapter accepts mono PCM16 input. Arbitrary byte chunks are buffered until a complete native processing block is available, so filter() may return b"". FilterEnableFrame can bypass or re-enable processing; toggling clears any incomplete buffered block.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arctan_vi-0.2.0-py3-none-any.whl (38.4 MB view details)

Uploaded Python 3

File details

Details for the file arctan_vi-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: arctan_vi-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 38.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for arctan_vi-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f524f0b4e9ce80ad647567d31b0f98def8d0a75be221d75373997fe1054c142
MD5 194eb640fb911fb94b3a09f8f52532cf
BLAKE2b-256 fc4902d72e6825af3cfb5dc6a3beb7d682419ae51c91f5076058dd14a15b650e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page