import type { LanguageCode } from '../../language.js';
/** Full model name (used for telemetry/billing via `detector.model`). */
export type TurnDetectorModel = 'turn-detector-v1' | 'turn-detector-v1-mini';
/** Public `version` constructor argument; maps to a {@link TurnDetectorModel}. */
export type TurnDetectorVersion = 'v1' | 'v1-mini';
export declare const LOCAL_LANGUAGES: Readonly<Record<string, number>>;
/**
 * User-supplied threshold override: a single value applied to every language,
 * a per-language map, or `undefined` (use the defaults).
 */
export type ThresholdOverride = number | Record<string, number> | undefined;
/**
 * Resolves per-language `unlikely` thresholds for the audio EOT detector.
 *
 * Holds three layers and re-materializes the effective map whenever any of
 * them changes:
 *
 * - **overrides** — what the user passed (`unlikelyThreshold`), normalized.
 * - **server/shipped defaults** — for `turn-detector-v1-mini` these are the
 *   shipped `LOCAL_LANGUAGES` table; for the cloud `turn-detector-v1` they arrive
 *   from the gateway via `_updateDefaults` (the `SessionCreated` message) and
 *   are `undefined` until then.
 * - **materialized** — `thresholds` (per-language map) + `defaultThreshold`
 *   (catch-all for languages absent from the map).
 *
 * The detector and its (single) active stream share one instance; the
 * cloud→local fallback mutates it in place via `_toLocalFallback`.
 */
export declare class ThresholdOptions {
    private _model;
    private _overrides;
    private _bcOverrides;
    private _serverThresholds;
    private _serverDefault;
    private _serverBcThresholds;
    private _serverBcDefault;
    private _thresholds;
    private _default;
    private _bcThresholds;
    private _bcDefault;
    constructor(model: TurnDetectorModel, overrides?: ThresholdOverride, backchannelOverrides?: ThresholdOverride);
    get model(): TurnDetectorModel;
    get overrides(): ThresholdOverride;
    get backchannelOverrides(): ThresholdOverride;
    get thresholds(): Readonly<Record<string, number>>;
    get defaultThreshold(): number | undefined;
    lookup(language: LanguageCode | string | undefined): number | undefined;
    /**
     * Backchannel threshold for a language, or `undefined` when backchannel is
     * disabled — no server defaults / overrides resolved, or the resolved value is
     * non-positive (an explicit "off"). Backchannel is server-driven and cloud-only.
     */
    lookupBackchannel(language: LanguageCode | string | undefined): number | undefined;
    supports(language: LanguageCode | string | undefined): boolean;
    updateOverrides(overrides: ThresholdOverride): void;
    updateBackchannelOverrides(overrides: ThresholdOverride): void;
    /**
     * @internal Adopt the calibrated defaults a `turn-detector` gateway sends in
     * `SessionCreated`. Raises (non-retryable) when the server produced no usable
     * thresholds — the caller degrades the session to the local model.
     */
    _updateDefaults(serverThresholds: Record<string, number>, serverDefault: number, backchannelThresholds?: Record<string, number>, backchannelDefault?: number): void;
    /**
     * @internal Promote to the local mini model on cloud→local fallback,
     * preserving the user's effective-vs-default ratio per language:
     * `local = LOCAL[lang] * (effective_t / server[lang])`.
     */
    _toLocalFallback(): void;
    private _resolve;
    /**
     * Layer a user override onto the server defaults. A scalar override replaces
     * the whole map (every language resolves through it); a dict override is
     * merged over the server map. Before server defaults arrive, only a scalar
     * override resolves up front.
     */
    private static _resolveLayer;
}
//# sourceMappingURL=languages.d.ts.map