interface TurnDetectorOptions {
    apiKey?: string;
    apiSecret?: string;
    backchannelThreshold?: number | Record<string, number>;
    baseUrl?: string;
    connOptions?: APIConnectOptions;
    executor?: InferenceExecutor;
    sampleRate?: number;
    unlikelyThreshold?: number | Record<string, number>;
    version?: TurnDetectorVersion;
}

Properties

apiKey?: string
apiSecret?: string
backchannelThreshold?: number | Record<string, number>

Backchannel threshold(s): above this, a pause is a backchannel opportunity. Server-driven and cloud-only by default; this is an override seam. A scalar applies to every language; a map is layered over the server defaults.

baseUrl?: string
connOptions?: APIConnectOptions

Inference executor that runs the local turn-detector-v1-mini model in the shared inference process. Defaults to the current job's getJobContext().inferenceExecutor. undefined (no job context / binding unavailable) degrades the local model to a positive-default prediction. Mainly an override seam for tests.

sampleRate?: number

Sample rate (Hz). Defaults to 16000.

unlikelyThreshold?: number | Record<string, number>

Which turn-detector version to run. 'v1' is the full cloud model (served over the inference gateway; model name 'turn-detector-v1'); 'v1-mini' is the local in-process model ('turn-detector-v1-mini'). When omitted, auto-selects 'v1' on hosted/dev environments (falling back to 'v1-mini' if cloud creds are missing) and 'v1-mini' otherwise.