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

For multiple streams, load one shared Model and create one ordered processor per stream. ProcessorAsync runs blocking native inference off the event loop; calls on one processor remain sequential while different processors can run in parallel.

import asyncio
import numpy as np
import arctan

model = arctan.Model()
config = arctan.ProcessorConfig.optimal(model, num_channels=1)
call_a = arctan.ProcessorAsync(model=model, config=config)
call_b = arctan.ProcessorAsync(
    model=model,
    config=arctan.ProcessorConfig.optimal(model),
)

async def process_calls():
    audio = np.zeros((config.num_channels, config.num_frames), dtype=np.float32)
    enhanced_a, enhanced_b = await asyncio.gather(
        call_a.process_async(audio),
        call_b.process_async(audio),
    )
    return enhanced_a, enhanced_b

try:
    enhanced_a, enhanced_b = asyncio.run(process_calls())
finally:
    call_a.close()
    call_b.close()
    model.close()

Create exactly one processor per audio stream and do not submit frames from the same stream out of order. The number of processors is the number of active streams; it is not a universal host-capacity claim.

The existing single-stream convenience remains supported. It creates and owns a private model internally:

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

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 Distributions

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

arctan_vi-0.7.0-cp314-cp314-win_amd64.whl (483.4 kB view details)

Uploaded CPython 3.14Windows x86-64

arctan_vi-0.7.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.35+ x86-64

arctan_vi-0.7.0-cp314-cp314-macosx_11_0_arm64.whl (539.4 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

arctan_vi-0.7.0-cp313-cp313-win_amd64.whl (474.9 kB view details)

Uploaded CPython 3.13Windows x86-64

arctan_vi-0.7.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.35+ x86-64

arctan_vi-0.7.0-cp313-cp313-macosx_11_0_arm64.whl (536.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

arctan_vi-0.7.0-cp312-cp312-win_amd64.whl (478.6 kB view details)

Uploaded CPython 3.12Windows x86-64

arctan_vi-0.7.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.35+ x86-64

arctan_vi-0.7.0-cp312-cp312-macosx_11_0_arm64.whl (542.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

arctan_vi-0.7.0-cp311-cp311-win_amd64.whl (491.6 kB view details)

Uploaded CPython 3.11Windows x86-64

arctan_vi-0.7.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.35+ x86-64

arctan_vi-0.7.0-cp311-cp311-macosx_11_0_arm64.whl (549.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

arctan_vi-0.7.0-cp310-cp310-win_amd64.whl (488.8 kB view details)

Uploaded CPython 3.10Windows x86-64

arctan_vi-0.7.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.35+ x86-64

arctan_vi-0.7.0-cp310-cp310-macosx_11_0_arm64.whl (554.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file arctan_vi-0.7.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: arctan_vi-0.7.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 483.4 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for arctan_vi-0.7.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 36a18ac673a150fbe55f261730c60a9228bd0e172a1cd4cfa936f4d974390864
MD5 17b606d54bd0b31fda1b6b351a589a57
BLAKE2b-256 019f68d7f2cba80cd817187e569ab3c9d84fbf4f914c1cfc8b545bc9b76062a4

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for arctan_vi-0.7.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 fe1350cb5e4445a91ad9d5aa34733708d1d3e4c5bc1524b50cd96eb5f451967f
MD5 77bb6b6df89edb3d3a88f050d5a94b5a
BLAKE2b-256 319dc89e08d4ce3a49f61afa89e18a6f4eb392f17b6d3023f63281c85e0c7f42

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arctan_vi-0.7.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 43326a21b2b63ff20754117f4ccc573c7d53bff7ed5dd6fc0a29586059fecdf2
MD5 3adec38d38fc969f870ac495bfd7b9fb
BLAKE2b-256 66e9e085c28858b61b3fc4b9368f3ff6c3928de071143b2c5899caae060d045e

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: arctan_vi-0.7.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 474.9 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for arctan_vi-0.7.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 06b66818f8025980b3a0a2b3f8f49f9dca7335f1eaac18279b37a21e85c340a0
MD5 dee5088f8657c776697f39af3ba954ec
BLAKE2b-256 01d52b825d6f900b446818a167e045095d23cdb7b08a14851a50cc7953cd4deb

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for arctan_vi-0.7.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 7d88f9a7d03ab719d970b677ff75bb18d5ad4ab7a6454e5f5ca0376736d13ea8
MD5 eadd01cfbf308477eb111505c5940d73
BLAKE2b-256 b57e8c3809a767d7ca150bd866add2132daf654bd46d79c9044311a0813a7514

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arctan_vi-0.7.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9f569ea1894f33bfb61dc43fd5cffed31802438d9108df9a15145ea088a7a9cd
MD5 8d46267afa881c5cb31a92d0329ad4d8
BLAKE2b-256 ed2787d79aed4f60e32a1baca7bce81236e574f03b5161e7fb24c4e73c96cb1f

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: arctan_vi-0.7.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 478.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for arctan_vi-0.7.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5b1f029cc9351a2b9f1a5f7c47e8232d9a32f68eff5df44248e6c32647e46db2
MD5 aff58f8a43fb827e698cf3409071cf34
BLAKE2b-256 7ca012851349839c1cbcfd7a2e4d3a705f55ae531459f8ae257edaffb430d5c2

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for arctan_vi-0.7.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 c9e0d816abdfb1b540f14f4e9b87a38561a0affce51cfa5e2e6c1af5d665d213
MD5 84ef7a2203eb1bcda959861dc494d3cb
BLAKE2b-256 9bf3d052e61cef6e2e1c5b13cabb0b36f04f22637253d2f52ec1fe42be95a061

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arctan_vi-0.7.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0a737a0f6629b9a8e83cc274fb3cb057a94117f1b2cb5473788d01ad9a1192eb
MD5 4aafd6d2f246b083a7a01e48bb6924b0
BLAKE2b-256 de9b49f039216e603c0d62bcf071a1ada74236e4f6aa2ac9fb0bb436c4da7f8f

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: arctan_vi-0.7.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 491.6 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for arctan_vi-0.7.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9a4e5541b07cac50fe18ff0640300f7152be617617f4977e3694ca132a9ddeeb
MD5 d63030f2eea394ad318ff47635719840
BLAKE2b-256 3aac3b744000a566d4614ed8fa7f51330cd6bb6e1a0a7325825665aba77b9596

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for arctan_vi-0.7.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 3df24e1f8e046f76cc4d84c41a8eae9ab9cd6437c7a79d18467bd4b63acbb3a6
MD5 c60ba8125d517156558e517197fce83b
BLAKE2b-256 95868e24072cf7a1608f41979053749994c2d3f5b91fb77401b4ff9bb88e4b05

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arctan_vi-0.7.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bf4abdbeaf7d4b483c75bc39991fcbb285424b72510bb0ae93e416494ee6714b
MD5 18076037e632c8fb90ee2b972716bd99
BLAKE2b-256 e94dfbb50741785ee93eec0a12b66c5ef1f66973580f18a2e9380cfb30ab5950

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: arctan_vi-0.7.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 488.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for arctan_vi-0.7.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 63e8ea01be62279942952854bd81b5f196305313975feebfcb73d4a4bc3612b6
MD5 a769de769a7cd6050c711a96eb0af949
BLAKE2b-256 55f343de23609d89a02c8e6a1738f17b73db45a6ff31013c4acfefdd5c721276

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for arctan_vi-0.7.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 9038ac6ec1a674ebd0c81c1e203ef6bda165a3f1c2111e6c91a972301d5b3df0
MD5 9e0428903e30f723e3c9cc923d9ccc84
BLAKE2b-256 b9fc8da6ba8cb3ab69cd9179d4989f4345990de78b112cff3ac9f7ea90833f40

See more details on using hashes here.

File details

Details for the file arctan_vi-0.7.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arctan_vi-0.7.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3b01d9d9c7c436b0a8700f34bde1833a356b4d307f6aba715804a6345010eb3f
MD5 904f5924eb412db83d71f69424051d05
BLAKE2b-256 b8b8cb0e5d470bb51139dfbfe25804d2637d7d68932efa0c471d183fc29d6ee1

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