Skip to main content

Audio Requirements

Arctan processes signed 16-bit PCM input audio. Configure your transport so one processor instance receives a stable sample rate and supported channel layout.

Shared requirements

  • Input audio must be signed 16-bit PCM.
  • The sample rate must be positive.
  • The sample rate must not change after processing starts.
  • Audio passed into a processing call must contain complete PCM16 samples.

LiveKit

LiveKit input is received as rtc.AudioFrame.

  • Mono and stereo frames are handled automatically.
  • Stereo frames are returned as stereo.
  • Channel counts other than 1 or 2 raise ValueError.
  • Frames must align to complete Arctan processing blocks.

If LiveKit changes sample rate for the same processor instance, processing raises ValueError.

Pipecat

Pipecat input is received as bytes.

  • Input must be PCM16 audio bytes.
  • Any byte chunk size is accepted when it contains complete PCM16 samples.
  • The filter buffers partial processing blocks between calls.
  • filter() returns b"" while waiting for enough audio to produce output.

The Pipecat integration does not resample audio. Configure the input transport to provide PCM16 at one stable sample rate.

Bypass behavior

LiveKit bypass uses ArctanNoiseCanceller.enabled. When your application sets enabled = False, Arctan returns the original frame.

Pipecat bypass uses FilterEnableFrame. Disabling or re-enabling processing clears incomplete buffered audio so stale partial audio is not combined with later input.