VoiceAgentRealtimeClientOptions interface

Options for the Voice Agents realtime client.

Properties

apiVersion

API version sent during the WebSocket upgrade.

connectionTimeoutInMs

Default connection timeout in milliseconds.

credentialScopes

Microsoft Entra scopes used to acquire a WebSocket access token.

userAgentPrefix

Prefix added to the SDK user-agent value in Node.js.

webSocketFactory

Overrides the transport used to establish the realtime WebSocket connection. Defaults to the platform transport (ws in Node.js, the browser's native WebSocket in browsers/React Native). Provide a custom factory to customize connection establishment.

Property Details

apiVersion

API version sent during the WebSocket upgrade.

apiVersion?: string

Property Value

string

connectionTimeoutInMs

Default connection timeout in milliseconds.

connectionTimeoutInMs?: number

Property Value

number

credentialScopes

Microsoft Entra scopes used to acquire a WebSocket access token.

credentialScopes?: string | string[]

Property Value

string | string[]

userAgentPrefix

Prefix added to the SDK user-agent value in Node.js.

userAgentPrefix?: string

Property Value

string

webSocketFactory

Overrides the transport used to establish the realtime WebSocket connection. Defaults to the platform transport (ws in Node.js, the browser's native WebSocket in browsers/React Native). Provide a custom factory to customize connection establishment.

webSocketFactory?: VoiceAgentWebSocketFactory

Property Value