docs(s2s): Speech-to-Speech API reference page#760
Merged
Conversation
Complete rewrite of the Speech-to-Speech docs page (hidden): - Quickstart with Python + JavaScript WebSocket examples - Full client→server and server→client event reference with schemas - Audio format spec (PCM16, 24kHz, mono) - Session configuration and system prompt guidance - Function calling: tool schema, handle function.call, send function.result - Interruption / barge-in handling - Browser integration with proxy pattern - Framework integrations (Pipecat + LiveKit) with code examples - Complete end-to-end customer support agent example - Event flow diagram Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
….ready Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… error codes New from realtime_model.py review: - greeting field in session.configure - session.resume client event (reconnection with session_id) - session_id field in session.ready response - session.updated server event - error codes: session_not_found, session_forbidden Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ction
The mabudu/renamed-events changes are deployed. Updated all event names:
- audio.append → input.audio
- session.configure → session.update
- speech.started → input.speech.started
- speech.stopped → input.speech.stopped
- response.audio → reply.audio
- response.transcript → transcript.agent
- response.done → reply.done
- function.call → tool.call (arguments is JSON string, not args dict)
- function.result → tool.result
Also:
- Tool schema uses nested {"type":"function","function":{...}} format
- Quickstart replaced with confirmed-working script
- Added warning: audio must be gated behind session_ready
- reply.done has optional status:"interrupted" field
- invalid_format error code added
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Key corrections: - Tool schema is flat (no nested "function" key) - tool.call args field is a dict, not a JSON string - tool.result must be sent in reply.done handler, NOT in tool.call - Accumulate pending_tools, send all on reply.done - On interrupted reply, discard pending_tools - Handle both "error" and "session.error" event types - Replaced quickstart with complete verified-working example Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Remove Warning about audio before session.ready - Remove reply.create (not commonly needed) - Remove reply.cancel (not commonly needed) - Remove reply.interrupted — interruptions come via reply.done status:interrupted - Add status field table to reply.done Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…l plugin usage Removed cards linking to U3 Pro docs (wrong product). Added tabbed code blocks with real Pipecat and LiveKit S2S integration examples. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… and LiveKit Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
LeeVaughn
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
speechtospeech.mdx(was an old placeholder for a different product) with full documentation for the native S2S WebSocket APIhidden: trueso it's not in the nav until ready to publishWhat's covered
audio.append,session.configure,response.create,response.cancel,function.resultsession.ready,speech.started/stopped,transcript.user.*,response.started/audio/transcript/done/interrupted,function.call,errorfunction.call, sendfunction.resultNotes
session.configureis sent immediately on WebSocket connect (not onsession.ready) — corrected throughout all examples and the event flow diagram🤖 Generated with Claude Code