Skip to main content

UserState

Lifecycle state of the human participant, as reported during a live call.

AgentState

Lifecycle state of the agent during a live call.

SpeechEventType

Stage of a speech-to-text result, reported on STTResponse.

VADEventType

Voice-activity-detection event, reported on VADResponse.

EOUConfig

Configure end-of-utterance (turn-end) detection. See EOUConfigOptions for defaults.

Constructor

mode
'ADAPTIVE' | 'DEFAULT'
End-of-utterance detection strategy. 'ADAPTIVE' tunes wait time to speech; 'DEFAULT' uses fixed bounds. Defaults to 'DEFAULT'.
minMaxSpeechWaitTimeout
[number, number] | number[]
[min, max] seconds to wait for the user to resume speaking before treating the turn as ended. Defaults to [0.5, 0.8].

InterruptConfig

Configure how the user can interrupt (barge in on) the agent while it speaks. If InterruptConfigOptions.interruptFadeDuration is set but the ms field is 0, the ms field is derived from it. See InterruptConfigOptions for defaults.

Constructor

mode
'VAD_ONLY' | 'STT_ONLY' | 'HYBRID'
Signal used to detect a barge-in: voice activity, transcription, or both. Defaults to 'HYBRID'.
interruptMinDuration
number
Minimum seconds of user speech required to count as an interruption. Defaults to 0.5.
interruptMinWords
number
Minimum number of recognized words required to interrupt. Defaults to 2.
interruptMinConfidence
number
Minimum STT confidence (0-1) required to interrupt. Defaults to 0.0 (no threshold).
falseInterruptPauseDuration
number
Seconds to pause the agent after a suspected false interruption. Defaults to 2.0.
resumeOnFalseInterrupt
boolean
Whether to resume the agent’s speech if an interruption turns out to be false. Defaults to true.
falseInterruptPauseDurationMs
number
Same as InterruptConfigOptions.falseInterruptPauseDuration but in milliseconds. Defaults to 2000.
interruptFadeDuration
number
Seconds to fade out agent audio when interrupted. Defaults to 0.0.
interruptFadeDurationMs
number
Fade-out in milliseconds; derived from InterruptConfigOptions.interruptFadeDuration when that is set. Defaults to 400.

RealtimeConfig

Configure a realtime (low-latency) model session. See RealtimeConfigOptions.

Constructor

mode
RealtimeConfigMode | string | null
Realtime processing mode. See RealtimeConfigMode. Defaults to null (provider default).
responseModalities
string[] | null
Output modalities the model should produce (e.g. ['text', 'audio']). Defaults to null (provider default).