message_format option when you request the session. Start with JSON for the best developer experience, and switch to MessagePack if you need better performance.
MessagePack messages must be encoded as maps with string keys, not as arrays. The structure must match the JSON schema exactly, with all field names preserved (for example,
{"source_media_chunk": {"data": <binary>}}). Some MessagePack libraries default to array encoding for performance, so check your library’s configuration.
The following example sends the same audio chunk in both encodings: