audioBuffersResampled

fun audioBuffersResampled(targetRate: Int): Flow<FloatArray>

audioBuffers resampled to targetRate, as a flow of float arrays.

Convenience over audioBuffers: each buffer's samples are resampled from the hardware capture rate to targetRate via SonixResampler. Use when a downstream consumer needs a fixed rate (e.g. 16 kHz for pitch detection / VAD) regardless of the device's actual capture rate. Otherwise prefer passing each AudioBuffer.sampleRate to the consuming API directly (ADR-017).

Return

Flow of resampled mono float arrays in -1, 1

Parameters

targetRate

Target sample rate in Hz