Skip to main content

AudioShakeSeparator

The core processing class. Takes raw audio buffers in, returns separated stem buffers. Multiple instances can run in parallel; each operates in a single thread.

Constructor

Methods

Processing

  • Returns number of output frames produced
  • Returns 0 if more input is needed before output is available
  • Returns -1 on error
  • Pass NULL for inputChannels to flush remaining audio (e.g. end of file)
  • Mono input is valid — the separator duplicates it across channels

Reuse

Reset internal state to process a new audio source without reconstructing the separator.

SourceSeparationTask

High-level wrapper that manages file reading, writing, and progress callbacks.

Constructor

Processing

Status

Progress callback


Input classes

AudioFileReader — reads from a file on disk (WAV, MP3, etc.):
RingBufferInput — accepts audio frames from a ring buffer for streaming:

Output classes

WAVOutput — writes each stem as a separate WAV file:
RingBufferOutput — exposes stems via a ring buffer:

Flags

Combine with |. Pass to AudioShakeSeparator or as additionalFlags to SourceSeparationTask.

Backend

Input format

Output format

Chunk size

Durations are approximate and vary by model. Smaller chunks reduce latency but increase compute cost.

Residual