AAI SDK
    Preparing search index...

    Interface AssemblyAIOptions

    Options for assemblyAIStt.

    interface AssemblyAIOptions {
        connectTimeoutMs?: number;
        maxConnectRetries?: number;
        minTurnSilenceMs?: number;
        model?: string;
        region?: "us" | "eu";
        voiceFocus?: string;
    }
    Index
    connectTimeoutMs?: number

    Deadline for one streaming connect attempt — socket open and the server's Begin message. Defaults to STT_CONNECT_TIMEOUT_MS (2500 ms), overriding the SDK's own 1000 ms, which a healthy handshake can exceed. 0 waits indefinitely.

    maxConnectRetries?: number

    Extra connect attempts after a transient failure (timeout, network drop, unexpected close); permanent failures such as auth are never retried. Defaults to STT_CONNECT_MAX_RETRIES (2). 0 disables retries.

    Raising either knob widens the worst-case open time ((1 + retries) * connectTimeoutMs plus the retry delays), which has to stay under DEFAULT_SESSION_START_TIMEOUT_MS — see the connect-budget note in sdk/constants.ts.

    minTurnSilenceMs?: number

    Minimum end-of-turn silence (ms) before the service commits a final, sent as the min_turn_silence connection parameter. This is where endpointing lives: mid-utterance pauses shorter than this aggregate into one final instead of splitting the request across turns. Defaults to DEFAULT_MIN_TURN_SILENCE_MS (2000).

    model?: string

    Streaming speech model. Defaults to "universal-3-5-pro" (Universal-3.5 Pro Real-Time). Arbitrary strings are forwarded to the SDK unchanged.

    region?: "us" | "eu"

    EU data-residency — routes both streaming and sync transcription to AssemblyAI's EU endpoints (streaming.eu.assemblyai.com / sync.eu.assemblyai.com). Required for EU-region API keys, which the US endpoints reject. Defaults to "us".

    voiceFocus?: string

    Voice focus (voice isolation) mode, sent as the voice_focus connection parameter. Defaults to "near-field" to suppress background noise for close-mic / phone audio. Set to "" (or "off") to disable.