Events
Constants
WebSocketMediaEnded
Triggers after the end of the audio stream sent by a third party through an OpenAI WebSocket (1 second of silence).
Parameters
client:
The OpenAI.Beta.RealtimeAPIClient instance.
mediaInfo:
OptionalInformation about the audio stream that can be obtained after the stream stops or pauses (1 second of silence).
tag:
string
OptionalSpecial tag to name audio streams sent over one OpenAI WebSocket connection. With it, one can send 2 audios to 2 different media units at the same time.
WebSocketMediaStarted
Triggered when the audio stream sent by a third party through an OpenAI WebSocket is started playing.
Parameters
client:
The OpenAI.Beta.RealtimeAPIClient instance.
customParameters:
{[key: string]: string}
OptionalCustom parameters.
encoding:
string
OptionalAudio encoding formats.
tag:
string
OptionalSpecial tag to name audio streams sent over one OpenAI WebSocket connection. With it, one can send 2 audios to 2 different media units at the same time.