Type Alias StreamingTranscriberParams

StreamingTranscriberParams: {
    apiKey?: string;
    channelAttribution?: ChannelAttributionParams;
    channels?: {
        name: string;
    }[];
    continuousPartials?: boolean;
    customerSupportAudioCapture?: boolean;
    domain?: StreamingDomain;
    encoding?: AudioEncoding;
    endOfTurnConfidenceThreshold?: number;
    filterProfanity?: boolean;
    formatTurns?: boolean;
    inactivityTimeout?: number;
    includePartialTurns?: boolean;
    interruptionDelay?: number;
    keyterms?: string[];
    keytermsPrompt?: string[];
    languageDetection?: boolean;
    llmGateway?: LLMGatewayConfig;
    maxSpeakers?: number;
    maxTurnSilence?: number;
    minEndOfTurnSilenceWhenConfident?: number;
    minTurnSilence?: number;
    prompt?: string;
    redactPii?: boolean;
    redactPiiPolicies?: StreamingPiiPolicy[];
    redactPiiSub?: StreamingPiiSubstitution;
    sampleRate: number;
    speakerLabels?: boolean;
    speechModel: StreamingSpeechModel;
    token?: string;
    turnLeftPadMs?: number;
    vadThreshold?: number;
    voiceFocus?: VoiceFocusModel;
    voiceFocusThreshold?: number;
    webhookAuthHeaderName?: string;
    webhookAuthHeaderValue?: string;
    webhookUrl?: string;
    websocketBaseUrl?: string;
}

Type declaration

  • OptionalapiKey?: string
  • OptionalchannelAttribution?: ChannelAttributionParams

    Tuning for dual-channel attribution. Ignored when channels is unset.

  • Optionalchannels?: {
        name: string;
    }[]

    Enable dual-channel (or N-channel) mode. Presence of channels switches the transcriber into channel-tagged mode: sendAudio(audio, { channel }) is required, per-channel VAD runs on the raw PCM, the streams are mixed to mono before being sent to the server, and emitted TurnEvents are enriched with channel and per-word channel attribution.

    Must contain exactly 2 entries with unique names. The names are echoed back in TurnEvent.channel / words[i].channel.

    Acoustic-leak caveat. Per-word channel attribution uses energy-based VAD on each channel. If your capture setup lets one channel's audio bleed into another at similar amplitude — typically system audio playing through speakers and being picked up by an open mic — attribution can misfire (mic-tagged words that were actually system). Transcription quality is unaffected; only the channel field is. To preserve attribution in speaker-leak setups, apply echo cancellation at capture before feeding audio to the SDK. In browsers, that's getUserMedia({ audio: { echoCancellation: true } }). On macOS native, AVAudioEngine.setVoiceProcessingEnabled(true) on the input node. If platform-level AEC isn't available, swap in a DNN VAD (e.g. Silero) via channelAttribution.createVad. See the dual-channel sample app's README for worked examples.

  • OptionalcontinuousPartials?: boolean
  • OptionalcustomerSupportAudioCapture?: boolean
  • Optionaldomain?: StreamingDomain
  • Optionalencoding?: AudioEncoding
  • OptionalendOfTurnConfidenceThreshold?: number
  • OptionalfilterProfanity?: boolean
  • OptionalformatTurns?: boolean
  • OptionalinactivityTimeout?: number
  • OptionalincludePartialTurns?: boolean
  • OptionalinterruptionDelay?: number
  • Optionalkeyterms?: string[]
  • OptionalkeytermsPrompt?: string[]
  • OptionallanguageDetection?: boolean
  • OptionalllmGateway?: LLMGatewayConfig
  • OptionalmaxSpeakers?: number
  • OptionalmaxTurnSilence?: number
  • OptionalminEndOfTurnSilenceWhenConfident?: number

    Use minTurnSilence instead. This parameter will be removed in a future release.

  • OptionalminTurnSilence?: number
  • Optionalprompt?: string
  • OptionalredactPii?: boolean
  • OptionalredactPiiPolicies?: StreamingPiiPolicy[]
  • OptionalredactPiiSub?: StreamingPiiSubstitution
  • sampleRate: number
  • OptionalspeakerLabels?: boolean
  • speechModel: StreamingSpeechModel
  • Optionaltoken?: string
  • OptionalturnLeftPadMs?: number
  • OptionalvadThreshold?: number
  • OptionalvoiceFocus?: VoiceFocusModel
  • OptionalvoiceFocusThreshold?: number
  • OptionalwebhookAuthHeaderName?: string
  • OptionalwebhookAuthHeaderValue?: string
  • OptionalwebhookUrl?: string
  • OptionalwebsocketBaseUrl?: string