Context
PR #476 fixes #474 by translating cumulative internal STT hypotheses into incremental Realtime transcription deltas and routing normal turn events by item.
During implementation, it also introduced a broader policy for authoritative TranscriptionCompletedEvent values that cannot be matched to a speech lifecycle item—for example, terminals emitted without turn_id / turn_revision, terminals emitted without a preceding SpeechStartedEvent, or metadata-less terminals arriving while multiple input items are unresolved.
That fallback policy is not required to fix #474 and should be designed separately.
Scope
- Define how a transcription terminal without a matching speech lifecycle item is represented in the Realtime conversation.
- Decide whether and when the server may synthesize a standalone input item.
- Define routing for metadata-less terminals when zero, one, or multiple input items are unresolved.
- Preserve the Realtime contract that the
item_id announced by input_audio_buffer.speech_started remains the identity used by matching transcription events.
- Document compatibility behavior for protocol-neutral pipelines that omit turn metadata.
- Add focused normal, missing-lifecycle, and ambiguous-overlap regressions.
Acceptance criteria
- A terminal that belongs to an announced speech item does not switch to a new item ID or lose its recorded duration.
- An ambiguous terminal never silently corrupts another item's transcript.
- Any synthesized item has an explicit, documented protocol lifecycle.
- The fallback behavior is deterministic and tested without changing incremental delta semantics.
Non-goals
Context
PR #476 fixes #474 by translating cumulative internal STT hypotheses into incremental Realtime transcription deltas and routing normal turn events by item.
During implementation, it also introduced a broader policy for authoritative
TranscriptionCompletedEventvalues that cannot be matched to a speech lifecycle item—for example, terminals emitted withoutturn_id/turn_revision, terminals emitted without a precedingSpeechStartedEvent, or metadata-less terminals arriving while multiple input items are unresolved.That fallback policy is not required to fix #474 and should be designed separately.
Scope
item_idannounced byinput_audio_buffer.speech_startedremains the identity used by matching transcription events.Acceptance criteria
Non-goals