Member Junction
    Preparing search index...

    Driver class for OpenAI GPT-Live 1 full-duplex realtime models.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    SupportsDynamicToolSet: true

    Whether this driver subclass supports dynamic, multi-tool sets projected into the realtime session (e.g. direct action invocation on realtime co-agents).

    Static capability descriptor read before a session instance exists. Default: absent / false. Subclasses that support dynamic toolsets declare public static readonly SupportsDynamicToolSet = true;.

    Accessors

    • get apiKey(): string

      Only sub-classes can access the API key

      Returns string

    • get SupportedVoices(): RealtimeVoiceOption[]

      Static fallback list of provider-native voices supported by this driver when metadata personas are not present or sparse.

      NOTE: Database metadata (MJ: AI Personas + AI Model Personas) is authoritative where configured. At runtime, GetRealtimeModelVoices unions metadata personas with this driver fallback list so that newly uncatalogued provider voices remain selectable while catalogued personas carry curated names/descriptions.

      Returns RealtimeVoiceOption[]

      The supported voice ids (id + human label), or [] when none are declared.

    • get SupportsClientDirect(): boolean

      Whether this driver can mint an ephemeral, server-scoped client credential for a client-direct realtime session (the browser opens its own provider socket).

      Returns boolean

    • get SupportsVideo(): boolean

      Whether this driver's sessions carry a video track in addition to audio — i.e. the model accepts video input (it can "see" the user's camera) and/or emits video output (a talking-head avatar / generated video), in sync with audio.

      Defaults to false (audio-only — today's realtime models). Video-capable drivers (a native multimodal realtime model, or an avatar provider) override this to true. The session's media plane is media-tagged (IRealtimeSession.SendInput takes a RealtimeMediaKind; IRealtimeSession.OnVideoOutput delivers video-out), so a video session reuses the entire realtime contract — only the media frames gain a video kind. Resolution prefers a video-capable model when an agent requests video, and degrades to audio-only otherwise.

      Returns boolean

      true if sessions can carry video; false (audio-only) otherwise.

    Methods

    • Exchanges a client WebRTC offer SDP for an answer SDP via OpenAI's POST /v1/live/sessions, using the server's project API key.

      In the OpenAI Live WebRTC topology, the browser never contacts api.openai.com directly; the trusted application server exchanges the offer for an answer and starts the session. Note: creating a WebRTC session pre-bills 15 seconds of voice duration.

      Parameters

      • offerSdp: string

        The local SDP offer generated by the browser.

      • OptionalsessionConfig: Record<string, unknown>

        The session configuration to initialize the session with.

      Returns Promise<{ answerSdp: string; prebillSeconds: number; sessionId: string }>

      The answer SDP, provider session ID, and the 15-second pre-bill accounting.

    • HTTP POST seam for /v1/live/sessions (unit tests override this to mock the HTTP call).

      Parameters

      • payload: unknown

      Returns Promise<{ id: string; transport: { sdp: string; type: string } }>