/**
 * Configuration for endpointing, which determines when the user's turn is complete.
 */
export interface EndpointingOptions {
    /**
     * Endpointing mode. `"fixed"` uses a fixed delay, `"dynamic"` adjusts delay based on
     * end-of-utterance prediction.
     * @defaultValue "fixed"
     */
    mode: 'fixed' | 'dynamic';
    /**
     * Minimum time in milliseconds since the last detected speech before the agent declares the user's
     * turn complete. In VAD mode this effectively behaves like `max(VAD silence, minDelay)`;
     * in STT mode it is applied after the STT end-of-speech signal, so it can be additive with
     * the STT provider's endpointing delay.
     * @defaultValue 500
     */
    minDelay: number;
    /**
     * Maximum time in milliseconds the agent will wait before terminating the turn.
     * @defaultValue 3000
     */
    maxDelay: number;
    /**
     * Exponential moving average coefficient for dynamic endpointing. Higher values give more
     * weight to history.
     * @defaultValue 0.9
     */
    alpha: number;
}
export declare const defaultEndpointingOptions: {
    readonly mode: "fixed";
    readonly minDelay: 500;
    readonly maxDelay: 3000;
    readonly alpha: 0.9;
};
/**
 * Tighter endpointing defaults used when the turn detector is a streaming
 * ("audio model") detector. Keys the caller does not provide fall back to
 * these instead of the legacy {@link defaultEndpointingOptions}.
 */
export declare const streamingEndpointingOptions: {
    readonly mode: "fixed";
    readonly minDelay: 300;
    readonly maxDelay: 2500;
    readonly alpha: 0.9;
};
export declare class BaseEndpointing {
    protected _minDelay: number;
    protected _maxDelay: number;
    protected _overlapping: boolean;
    constructor({ minDelay, maxDelay }: {
        minDelay: number;
        maxDelay: number;
    });
    updateOptions({ minDelay, maxDelay }: {
        minDelay?: number;
        maxDelay?: number;
    }): void;
    get minDelay(): number;
    get maxDelay(): number;
    get overlapping(): boolean;
    onStartOfSpeech(_startedAt: number, overlapping?: boolean): void;
    onEndOfSpeech(_endedAt: number, _shouldIgnore?: boolean): void;
    onStartOfAgentSpeech(_startedAt: number): void;
    onEndOfAgentSpeech(_endedAt: number): void;
}
export declare class DynamicEndpointing extends BaseEndpointing {
    #private;
    constructor({ minDelay, maxDelay, alpha, }: {
        minDelay: number;
        maxDelay: number;
        alpha?: number;
    });
    get minDelay(): number;
    get maxDelay(): number;
    get betweenUtteranceDelay(): number;
    get betweenTurnDelay(): number;
    get immediateInterruptionDelay(): [number, number];
    onStartOfAgentSpeech(startedAt: number): void;
    onEndOfAgentSpeech(endedAt: number): void;
    onStartOfSpeech(startedAt: number, overlapping?: boolean): void;
    onEndOfSpeech(endedAt: number, shouldIgnore?: boolean): void;
    updateOptions({ minDelay, maxDelay, alpha, }: {
        minDelay?: number;
        maxDelay?: number;
        alpha?: number;
    }): void;
}
export declare function createEndpointing(options: EndpointingOptions): BaseEndpointing;
//# sourceMappingURL=endpointing.d.ts.map