import { type PipelineBus } from "./pipeline-bus.js"; import type { VadAudioPacket, VadSpeechActivityPacket, VadSpeechEndedPacket, VadSpeechStartedPacket } from "./packets.js"; import { PrimarySpeakerGate } from "./primary-speaker-gate.js"; import { TtsPlayoutClock } from "./tts-playout-clock.js"; export declare function isBackchannel(text: string): boolean; export declare function isAcknowledgement(text: string, phrases: readonly string[]): boolean; export interface TurnArbiterDeps { readonly bus: PipelineBus; readonly primarySpeakerGate: PrimarySpeakerGate; readonly ttsPlayout: TtsPlayoutClock; readonly minInterruptionMs: number; readonly onInterrupt?: (interruptedContextId: string, source: "vad") => void; /** When true, emit `interaction.duck` while evaluating a barge-in during active TTS, * and `interaction.resume` if the pending window resolves without an interrupt. */ readonly pauseThenResolveBargeIn?: boolean; } export declare class TurnArbiter { private readonly deps; private turnInterruption; private latestInterimText; private latestInterimConfidence; private ducked; constructor(deps: TurnArbiterDeps); noteInterimEvidence(text: string, confidence?: number): void; onSpeechStarted(pkt: VadSpeechStartedPacket, interruptedContextId: string): void; onSpeechActivity(pkt: VadSpeechActivityPacket): void; onProviderSttEvidence(userContextId: string, timestampMs: number, interruptedContextId: string): void; onSpeechEnded(pkt: VadSpeechEndedPacket, hasActiveTts: boolean): void; observeBargeInAudio(pkt: VadAudioPacket): boolean; emitInterruptDetected(interruptedContextId: string): void; commitClientInterrupt(interruptedContextId: string): void; clear(): void; private pendingFor; private transitionToPending; private setAwaitingAudio; private shouldDeferImmediateBargeInForSpeakerGate; private tryCommit; private decideInterrupt; private suppress; } //# sourceMappingURL=turn-arbiter.d.ts.map