Live Audio Capture & Frame Decoding
MeetStream streams real-time meeting audio to your application over a WebSocket connection. Audio arrives as speaker-tagged binary frames of two types. Type 0x01 frames are 48 kHz mono. Type 0x04 frames carry the sample rate and channel count in the header. Zoom sends 0x04 frames (32 kHz). Google Meet can send both types in the same call, so your decoder must read byte 0 of every frame and handle 0x01 and 0x04.
Overview
When you create a bot with the live_audio_required configuration, MeetStream opens a WebSocket connection from the bot to your server and continuously streams binary audio frames for the duration of the meeting.
Enabling Live Audio
Include live_audio_required in your Create Bot API request:
The websocket_url is a WebSocket endpoint you host. MeetStream connects to it as a client.
Connection Lifecycle
1. Bot connects to your WebSocket endpoint
The bot initiates the connection when it joins the meeting.
2. Bot sends a JSON text handshake
The first message is always a JSON text frame:
3. Binary audio frames stream continuously
Every subsequent message is a binary WebSocket frame containing PCM audio with embedded speaker metadata. Frames arrive continuously for the duration of the meeting.
4. Connection closes when the bot leaves
The WebSocket closes with a normal 1000 close code when the bot exits the meeting.
Timeline

Binary Frame Format
Every audio frame is a single binary WebSocket message. Byte 0 is the message type:
0x01: PCM16 mono at 48 kHz. No format header.0x04: The header carries the sample rate and the channel count. Zoom sends this type. Google Meet also sends it.
Do not choose the layout from the platform. Choose it from byte 0 of each frame. In live Google Meet calls the bot sent one 0x01 frame and then only 0x04 frames. A decoder that reads every Google Meet frame as 0x01 gets no usable audio.
Type 0x01:
Type 0x04 (Zoom, Google Meet):
Field-by-Field Breakdown
H is the header length before the speaker fields: 1 for 0x01 frames and 6 for 0x04 frames.
Important
- There are no delimiters between fields. The format is length-prefixed: you read the 2-byte length, then read that many bytes for the string.
- The
sid_lengthandsname_lengthvalues change depending on the length of the speaker’s name and ID. These are not fixed values or delimiters. They are standard unsigned 16-bit little-endian integers encoding a string length. - Read byte 0 first.
0x01and0x04are the audio message types. Skip frames with any other type, so that your code keeps working if new types are added.
Audio Properties
To calculate duration from a frame:
Hex Dump Walkthrough
A 0x01 frame (Google Meet) from a speaker named "Alice" with ID "user_42":
A 0x01 frame (Teams) from "James Chen" with ID "James Chen":
A 0x04 frame (Zoom) at 32 kHz mono from "Alice" with ID "16778240":
Note: 0x07 = 7, 0x0A = 10, 0x0E = 14, etc. These are string lengths, not protocol markers.
Decoding Examples
Each decoder reads byte 0, takes the sample rate from the frame, and returns it with the speaker fields and the audio. Use the decoder for all platforms: Google Meet sends both 0x01 and 0x04 frames.
Python
JavaScript / Node.js
Go
Java
Full Receiver Examples
Python — Receive and Log
Node.js — Receive and Log
Working with PCM Audio
Convert to NumPy Array (Python)
Save as WAV File (Python)
Accumulate and Save a Full Meeting Recording
Resample to a Different Rate (Python)
Many speech-to-text services expect 16 kHz audio. Resample with numpy:
Convert to Int16 Array in JavaScript
Speaker Identification
Each frame includes both a speaker_id and a speaker_name:
Platform Behavior
Handling "NoSpeaker"
When no speaker is identified for a frame, both fields are "NoSpeaker", for example in the first moments of a meeting.
On Google Meet, the mixed audio stream can be tagged "NoSpeaker" while people talk. Do not rely on the speaker fields alone to find who is talking, or to skip your own bot’s voice (echo). To skip the bot’s voice, also use what your bot is sending, for example mute your input while the bot speaks.
Message Types on the Audio Channel
Check byte 0 and skip unknown types, so that your code keeps working if new types are added.
FAQ
What sample rate does the audio arrive at?
0x01 frames: 48,000 Hz. 0x04 frames: read the rate from the header (Zoom: 32,000 Hz). Google Meet sends 0x04 frames too, so do not assume 48 kHz for a Google Meet call. Read the rate from each 0x04 frame, so that your code also works if the rate changes.
Is the audio mixed or per-speaker?
Google Meet: mixed audio, tagged with the active speaker. Teams: mixed audio, tagged with the dominant speaker. When per-participant audio is on, Teams sends per-participant frames. Zoom: one frame for each speaker, with that speaker’s speech only.
How large is each frame?
Frame sizes vary. Typical frames contain 1,000 to 50,000+ samples (20 ms to 1+ seconds of audio). The size depends on the platform’s audio capture interval and buffering.
Can I receive audio from specific speakers only?
Filter on speaker_id or speaker_name after you decode each frame. On Zoom, each frame carries one speaker’s speech. On Google Meet and Teams, frames carry mixed audio tagged with the active or dominant speaker. For one file for each participant after the call, use per-participant audio.
Do I need to send an acknowledgment for each frame?
No. The protocol is fire-and-forget. The bot streams continuously and does not expect any response on the audio channel.
What happens if my server is slow to consume frames?
Frames will buffer in the WebSocket layer. If the buffer grows too large, the connection may drop. Ensure your receiver processes or discards frames promptly.
Why does the sid_length value change between sessions?
The 2-byte length field reflects the byte length of the speaker’s ID string. Different speakers have different name/ID lengths:
"Alice"= 5 bytes →sid_length=0x05 0x00"James Chen"= 10 bytes →sid_length=0x0A 0x00"Bob"= 3 bytes →sid_length=0x03 0x00
This is not a delimiter or protocol variation. It is a standard length-prefixed string encoding.
How should I parse the binary format defensively?
Always read the 2-byte length, then read exactly that many bytes. Never hard-code expected length values. A correct parser:
An incorrect parser:
Can speaker names contain non-ASCII characters?
Yes. Speaker names are UTF-8 encoded. A name like "Javier Martínez" is 16 bytes, while "佐藤太郎" is 12 bytes (3 bytes per CJK character). Always use the length prefix. Never scan for fixed byte patterns.
What if I only need the audio and don't care about speaker info?
Skip past the headers:
The audio is at 48 kHz for 0x01 frames. For 0x04 frames, read the rate from bytes 1 to 4.
