Pure encode of one outbound PCM16 ArrayBuffer into the Twilio Media-Streams outbound media frame
shape — PCM16 → μ-law via the T0 codec (pcm16ToMuLawBuffer) → base64 payload. The returned object
is JSON.stringify-ready for the websocket send.
Parameters
pcm: ArrayBuffer
The agent's outbound PCM16 audio.
streamSid: string
The Media-Streams stream SID the frame is addressed to.
Pure encode of one outbound PCM16
ArrayBufferinto the Twilio Media-Streams outboundmediaframe shape — PCM16 → μ-law via the T0 codec (pcm16ToMuLawBuffer) → base64 payload. The returned object isJSON.stringify-ready for the websocket send.