Skip to main content

Standard Python

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

Requirements

  • Python 3.10 or newer.
  • An Arctan SDK license key.
  • Network access from the process for SDK license key validation.
  • NumPy audio arrays shaped as channels x frames.

Install

pip install arctan-vi

Includes the core Arctan SDK for direct NumPy-based processing.

License key

Set the key in the process 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.

Process audio

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

Pass the SDK license key explicitly

processor = arctan.Processor(
config=config,
license_key="arc_sk_live_...",
)

license_key overrides ARCTAN_SDK_KEY.

Runtime behavior

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.