- Notifications
You must be signed in to change notification settings - Fork288
Update more realtime spec#397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
codesoda wants to merge5 commits into64bit:mainChoose a base branch fromcodesoda:chore/update-realtime-spec
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Draft
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
- Added `Cancelled` variant to `ResponseStatusDetail` enum for better handling of cancelled responses.- Introduced `LogProb` struct to capture log probability information for transcribed tokens.- Updated `ConversationItemInputAudioTranscriptionCompletedEvent` and `ConversationItemInputAudioTranscriptionDeltaEvent` to include optional `logprobs` for per-token log probability data.- Enhanced `AudioTranscription` struct with optional fields for `language`, `model`, and `prompt` to improve transcription accuracy and customization.- Added new `SemanticVAD` option in the `TurnDetection` enum to control model response eagerness.- Expanded `RealtimeVoice` enum with additional voice options for more variety in audio responses.
- Changed enum variants for `AudioFormat` to use underscores instead of hyphens in their serialized names.- Updated `G711ULAW` from `g711-ulaw` to `g711_law` and `G711ALAW` from `g711-alaw` to `g711_alaw` for improved clarity and adherence to naming conventions.
…nd response management
Sign up for freeto 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.
Uh oh!
There was an error while loading.Please reload this page.
🚀 Summary
Syncs
async-openai
realtime types with the latest OpenAI Realtime API (June 2025).Adds richer request/response configs, new client & server events, extra enums for models / voices / modalities, plus tracing & noise-reduction support.
✨ What’s new
Client events
ResponseConfig
,OutputAudioBufferClearEvent
,ConversationItemRetrieveEvent
.ResponseCancelEvent
gainsresponse_id
.ResponseCreateEvent
now usesResponseConfig
instead ofSessionResource
.Server events
output_audio_buffer.cleared
,conversation.item.input_audio_transcription.delta
,conversation.item.retrieved
.InputAudioBufferCommitedEvent
→InputAudioBufferCommittedEvent
.Response resource
finish_reason
,created_at
.TokenLimit
,FunctionCall
.Session resource
RealtimeModel
,Modality
,NoiseReductionType
.speed
,input_audio_noise_reduction
,tracing
.model
is nowRealtimeModel
;modalities
isVec<Modality>
.Turn detection
semantic_vad
mode withcreate_response
andinterrupt_response
flags.Audio
g711_ulaw
,g711_alaw
).InputAudioNoiseReduction
.Tooling
ToolChoice
&ToolDefinition
intoResponseConfig
.ResponseCreateEvent
:response
now expectsResponseConfig
,notSessionResource
.g711-ulaw
/g711-alaw
→g711_ulaw
/g711_alaw
.InputAudioBufferCommitedEvent
→InputAudioBufferCommittedEvent
.SessionResource.model
is nowRealtimeModel
(no longer a free-formString
).