Hierarchy

  • RealtimeSession
    • RealtimeSession

Constructors

Accessors

Methods

  • Try to recover from a text response to audio mode.

    Parameters

    • itemId: string

    Returns void

    Remarks

    Sometimes the OpenAI Realtime API returns text instead of audio responses. This method tries to recover from this by requesting a new response after deleting the text response and creating an empty user audio message.

  • Parameters

    • __namedParameters: {
          inputAudioFormat?: "pcm16";
          inputAudioTranscription?: null | InputAudioTranscription;
          instructions?: string;
          maxResponseOutputTokens?: number;
          modalities: ["text", "audio"] | ["text"];
          outputAudioFormat?: "pcm16";
          selectedTools?: string[];
          temperature?: number;
          toolChoice?: string;
          turnDetection?: null | TurnDetectionType;
          voice?: string;
      }
      • Optional inputAudioFormat?: "pcm16"
      • Optional inputAudioTranscription?: null | InputAudioTranscription
      • Optional instructions?: string
      • Optional maxResponseOutputTokens?: number
      • modalities: ["text", "audio"] | ["text"]
      • Optional outputAudioFormat?: "pcm16"
      • Optional selectedTools?: string[]
      • Optional temperature?: number
      • Optional toolChoice?: string
      • Optional turnDetection?: null | TurnDetectionType
      • Optional voice?: string

    Returns void