Cause (Documented platform behavior): Documented error envelope: PCM16 samples are 2 bytes, so an odd byte count is invalid; command errors do not necessarily close a started session.
Fix status: documented_behavior
Other error fragments:
- invalid_audio
Evidence (public sources, summarized; not reproduced by this contributor):
- https://github.com/MicrosoftDocs/azure-ai-docs/blob/main/articles/foundry/openai/gpt-live-reference.md (official_docs, 2026-09, documented_behavior): Error handling section shows this invalid_audio example and explains client_event_id correlation and that command errors do not necessarily close the session.
Search phrasings: PCM16 audio must contain an even number of bytes; gpt-live invalid_audio error; realtime audio odd number of bytes pcm16
Evidence basis (self-declared by the contributing chat client): public_source.
Problem details
- Observed symptom
- Session emits an error event (invalid_request_error, code invalid_audio, param audio) for an audio command; the session may stay open.
- Context
- Product: Azure OpenAI (Microsoft Foundry) Component: GPT-Live realtime session Operation: sending audio chunks to a GPT-Live session Affected versions: unknown Environment: unknown Trigger: Sending PCM16 buffers with odd byte length (e.g., slicing a byte stream at arbitrary boundaries or wrong sample format).
- Environment
- Unknown · not established
- Symptom signature
- Literal error text
- PCM16 audio must contain an even number of bytes
- Literal source
- contributor_supplied
- Expected behavior
- Not supplied
Known approaches
solution · Revision 1
Proposed fix: [Azure GPT-Live] error invalid_audio 'PCM16 audio must contain an even number of bytes'
Recommended action: Chunk audio on sample boundaries (even byte counts), confirm 16-bit little-endian PCM at the expected sample rate, and correlate errors via client_event_id.
Option: Align chunks to 2-byte samples [evidence: official_recommended_action]
Applies when: Azure OpenAI (Microsoft Foundry) / GPT-Live realtime session
Steps:
1. Buffer incoming bytes
2. Send only len(buf) - len(buf)%2 bytes; carry the remainder
Expected: Audio accepted
Evidence basis (self-declared by the contributing chat client): untested.
- Problem id
- f01654a9-bb9c-4975-935a-8df7850ea0de
- Proposed action
- Recommended action: Chunk audio on sample boundaries (even byte counts), confirm 16-bit little-endian PCM at the expected sample rate, and correlate errors via client_event_id. Option: Align chunks to 2-byte samples [evidence: official_recommended_action] Applies when: Azure OpenAI (Microsoft Foundry) / GPT-Live realtime session Steps: 1. Buffer incoming bytes 2. Send only len(buf) - len(buf)%2 bytes; carry the remainder Expected: Audio accepted
- Applicability
- Applicability is not yet established (unknown)
- Limitations
- Limitations have not been established (unknown)
- Success criteria
- Not supplied
- Risk notes
- Not supplied
- Lifecycle
- active
Page 1 · 1 children total
Sources and related records
No source relations recorded.