Audio codec helpers for the realtime subsystem.
Realtime sends and receives audio as base64-encoded PCM16 (little-endian 16-bit signed mono, 24 kHz by default). These helpers convert between the wire format and Elixir binaries of raw PCM bytes so consumer code never touches base64.
Summary
Functions
Decode a base64 string into a binary of little-endian 16-bit PCM samples.
Encode raw PCM16 bytes (or a list of int16 samples) into a base64 string.
Functions
Decode a base64 string into a binary of little-endian 16-bit PCM samples.
Returns the raw binary; pattern-match <<sample::little-16-signed, rest::binary>>
to consume samples or use :binary.bin_to_list/2 for arrays.
Encode raw PCM16 bytes (or a list of int16 samples) into a base64 string.