OpenAIRealtimeWebRTCOptions
type OpenAIRealtimeWebRTCOptions = object & OpenAIRealtimeBaseOptions;
The options for the OpenAI Realtime WebRTC transport layer.
Type declaration
Section titled “Type declaration”audioElement?
Section titled “audioElement?”optional audioElement: HTMLAudioElement;
The audio element to use for audio playback. If not provided, a new audio element will be created.
baseUrl?
Section titled “baseUrl?”optional baseUrl: string;
Override of the base URL for the Realtime API
mediaStream?
Section titled “mediaStream?”optional mediaStream: MediaStream;
The media stream to use for audio input. If not provided, the default microphone will be used.
useInsecureApiKey?
Section titled “useInsecureApiKey?”optional useInsecureApiKey: boolean;
Important: Do not use this option unless you know what you are doing.
Whether to use an insecure API key. This has to be set if you are trying to use a regular OpenAI API key instead of a client ephemeral key.
https://platform.openai.com/docs/guides/realtime#creating-an-ephemeral-token