Skip to main content
Python SDK 3.0 tracks core SDK 0.22.0. It contains two breaking changes that affect every integration, plus a set of renames.

Audio is mono only

process() and buffer() take a 1D array. The internal mixdown is gone.

VAD is its own object

Vad runs a dedicated VAD model. Energy-based VAD is removed.
This page is the Python-specific reference. The two guides above explain the reasoning and the audio-handling changes in more detail.
Your license key and your enhancement models keep working. No key regeneration is needed for this upgrade.

Quick migration checklist

1

Downmix to mono

Pass a 1D float32 array to process(), process_async(), and buffer(). A 2D array now raises AudioConfigMismatchError.
2

Rename the config fields

num_frames is block_size, allow_variable_frames is variable_block_size, and num_channels is gone.
3

Rename get_processor_context

It is now get_context() on both Processor and ProcessorAsync.
4

Replace the processor-owned VAD

Create a Vad or VadAsync from a dedicated VAD model. get_vad_context() no longer exists.
5

Update the three renamed error classes

NotInitializedError, ProcessingNotAllowedError, and FilePathInvalidError.
6

Keep model types in the right objects

Processor takes enhancement and bypass models only. Vad takes VAD models only.

Renames

ProcessorConfig

ProcessorConfig is shared by Processor, Vad, and Collector.

Model

Processor and ProcessorAsync

ProcessorContext

The rename says what the value delays. get_audio_delay() reports how far the enhanced samples lag their input. It no longer covers VAD timing, because the VAD has its own get_prediction_delay(). ProcessorContext.reset() now affects enhancement state only. Reset a VAD through its own VadContext.

Errors

Migrate enhancement

To downmix a file loaded with soundfile:
mean(axis=1) widens to float64 for many input dtypes, so cast back to float32. process() also needs a contiguous array, which is why slices of a larger buffer may need np.ascontiguousarray.
To keep channels separate, create one Processor per channel. Each one holds the state for exactly one stream.

Migrate VAD

VadParameter.Sensitivity is now a probability threshold from 0.0 to 1.0, and the direction is inverted: higher values require more confidence and therefore fire less often. Old energy-threshold values above 1.0 raise ParameterOutOfRangeError. Retune against real audio and start from the model default. See Retune sensitivity.
Running both together, on the same original input block:
Feed the VAD the original input rather than the enhanced output. Enhancement changes the signal the VAD model was trained on, and it adds the processor’s delay on top of the VAD’s own.

Async VAD

VadAsync mirrors ProcessorAsync:

VadContext

VadContext gained the methods the processor context already had:
These names match the C API’s aic_processor_context_get_audio_delay and aic_vad_context_get_prediction_delay.

Model types are enforced

A mismatch raises ModelTypeUnsupportedError at creation time.

Session termination

Processor, Vad, and Analyzer can now close their telemetry session explicitly, instead of waiting for garbage collection:
The object cannot process more audio afterwards. The session is still terminated automatically on destruction, so this is only needed where deallocation may be delayed.

Validation

  • Confirm every process(), process_async(), and buffer() call receives a contiguous 1D float32 array.
  • Confirm no code still reads config.num_frames, config.num_channels, or config.allow_variable_frames.
  • Search for get_processor_context and get_vad_context.
  • Search for the three renamed error classes, including in except clauses.
  • Compare speech detection against representative audio after retuning sensitivity.
  • Compare enhancement output level against representative recordings if you previously relied on the internal mixdown and mixback.

Need help?