OpenAILiveTransport
Defined in: packages/realtime-openai-live/src/live-transport.ts:142
Explicit WebRTC transport with L1 continuous observations. Managed function execution and Maelstrom grounding belong to a separate integration. Finish required Responses function outputs before calling disconnect: session.close rejects later commands. This transport never reconnects or replays commands.
Implements
Section titled “Implements”RealtimeTransportAdapter<LiveSessionConfig>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new OpenAILiveTransport(
options):OpenAILiveTransport
Defined in: packages/realtime-openai-live/src/live-transport.ts:179
Creates an inert transport. No media or billed session starts until connect.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”OpenAILiveTransport
Properties
Section titled “Properties”diagnostics
Section titled “diagnostics”
readonlydiagnostics:AdapterDiagnosticSource
Defined in: packages/realtime-openai-live/src/live-transport.ts:147
Optional projected native evidence; subscribing never starts media or transport work.
Implementation of
Section titled “Implementation of”RealtimeTransportAdapter.diagnostics
observations
Section titled “observations”
readonlyobservations:AdapterVoiceObservations
Defined in: packages/realtime-openai-live/src/live-transport.ts:169
Optional continuous evidence channel; transcript fragments never imply final turns.
Implementation of
Section titled “Implementation of”RealtimeTransportAdapter.observations
Methods
Section titled “Methods”activateAudio()
Section titled “activateAudio()”activateAudio():
Promise<void>
Defined in: packages/realtime-openai-live/src/live-transport.ts:268
Retries output playback within a user action. Resolution means play acceptance, not audible delivery.
Returns
Section titled “Returns”Promise<void>
connect()
Section titled “connect()”connect(
session):Promise<void>
Defined in: packages/realtime-openai-live/src/live-transport.ts:228
Starts microphone acquisition within the caller’s user activation; concurrent starts share one attempt.
Parameters
Section titled “Parameters”session
Section titled “session”LiveSessionConfig
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”RealtimeTransportAdapter.connect
disconnect()
Section titled “disconnect()”disconnect():
Promise<void>
Defined in: packages/realtime-openai-live/src/live-transport.ts:311
Stops participation promptly, then drains session.closed for a bounded interval. Never waits for host tool work.
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”RealtimeTransportAdapter.disconnect
getAudioStreams()
Section titled “getAudioStreams()”getAudioStreams():
AdapterAudioStreams
Defined in: packages/realtime-openai-live/src/live-transport.ts:222
Returns current streams for metering; local participation disappears immediately on stop.
Returns
Section titled “Returns”AdapterAudioStreams
Implementation of
Section titled “Implementation of”RealtimeTransportAdapter.getAudioStreams
getSnapshot()
Section titled “getSnapshot()”getSnapshot():
LiveTransportSnapshot
Defined in: packages/realtime-openai-live/src/live-transport.ts:195
Returns detached lifecycle and final provider evidence; native fields cannot mutate transport state.
Returns
Section titled “Returns”on(
handler): () =>void
Defined in: packages/realtime-openai-live/src/live-transport.ts:206
Subscribes to legacy lifecycle events without fabricating turn activity.
Parameters
Section titled “Parameters”handler
Section titled “handler”(event) => void
Returns
Section titled “Returns”() => void
Implementation of
Section titled “Implementation of”RealtimeTransportAdapter.on
onServerEvent()
Section titled “onServerEvent()”onServerEvent(
handler): () =>void
Defined in: packages/realtime-openai-live/src/live-transport.ts:213
Subscribes to validated native envelopes. Nested Responses payloads require consumer validation.
Parameters
Section titled “Parameters”handler
Section titled “handler”(event, generation) => void
Returns
Section titled “Returns”() => void
send()
Section titled “send()”send(
command,generation,contextKind?):void
Defined in: packages/realtime-openai-live/src/live-transport.ts:278
Submits one command only to the supplied generation. There is no queue, retry, or success acknowledgment.
Parameters
Section titled “Parameters”command
Section titled “command”LiveCommand
generation
Section titled “generation”number
contextKind?
Section titled “contextKind?”Returns
Section titled “Returns”void
subscribe()
Section titled “subscribe()”subscribe(
handler): () =>void
Defined in: packages/realtime-openai-live/src/live-transport.ts:199
Observes metadata changes, including autoplay recovery and finalization.
Parameters
Section titled “Parameters”handler
Section titled “handler”() => void
Returns
Section titled “Returns”() => void