Rate this page:

Events

Constants

WebSocketMediaEnded

Copy URL

Triggers after the end of the audio stream sent by a third party through an OpenAI WebSocket (1 second of silence).

Parameters

  • Optional

    Information about the audio stream that can be obtained after the stream stops or pauses (1 second of silence).

  • tag:

    string

    Optional

    Special 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

Copy URL

Triggered when the audio stream sent by a third party through an OpenAI WebSocket is started playing.

Parameters

  • customParameters:

    {[key: string]: string}

    Optional

    Custom parameters.

  • encoding:

    string

    Optional

    Audio encoding formats.

  • tag:

    string

    Optional

    Special 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.