A session for the OpenAI Realtime API.

This class is used to interact with the OpenAI Realtime API. It is responsible for sending events to the OpenAI Realtime API and receiving events from it.

It exposes two more events:

  • openai_server_event_received: expose the raw server events from the OpenAI Realtime API
  • openai_client_event_queued: expose the raw client events sent to the OpenAI Realtime API

Hierarchy (view full)

Constructors

Accessors

Methods

  • Parameters

    • audioStream: ReadableStream<AudioFrame>

    Returns void

  • Notifies the model that user activity has started

    Returns void