Skip to content

bodhi-realtime-agent / encodePcmToMulaw

Function: encodePcmToMulaw()

encodePcmToMulaw(pcmBuf): Buffer

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

Encode a PCM L16 buffer (16-bit signed LE) to mulaw. Output has half the byte length of input (2 PCM bytes → 1 mulaw byte).

Parameters

pcmBuf

Buffer

Returns

Buffer

Built with VitePress