Skip to content

bodhi-realtime-agent / resample

Function: resample()

resample(pcmBuf, fromRate, toRate): Buffer

Defined in: telephony/audio-codec.ts:82

Resample PCM L16 audio between sample rates using linear interpolation. Input and output are Buffers of 16-bit signed LE samples.

Parameters

pcmBuf

Buffer

fromRate

number

toRate

number

Returns

Buffer

Built with VitePress