import { type Scheduler } from "./scheduler.js"; export declare class TtsPlayoutClock { private readonly scheduler; private readonly active; private readonly playoutEndMs; private readonly releaseTimers; private readonly realPlayoutContexts; private readonly playedOutMsByContext; constructor(scheduler?: Scheduler); /** * A TTS audio chunk arrived: mark the context active and advance its playout * cursor by the chunk's realtime duration, anchored to `nowMs` if the previous * estimate already lapsed (a gap in delivery). */ noteAudio(contextId: string, audioDurationMs: number, nowMs: number): void; /** * Generation finished (tts.end). Keep the context interruptible until its * playout estimate elapses, then release it. Releases immediately if the * estimate has already passed. */ scheduleRelease(contextId: string, nowMs: number): void; /** * Transport reported realtime playout progress for a context. Real playout is * authoritative once seen; release the context when it reports complete. */ noteProgress(contextId: string, complete: boolean, playedOutMs?: number): void; positionMs(contextId: string): number | undefined; release(contextId: string): void; isActive(contextId: string): boolean; /** All still-active contexts, insertion order (oldest first). */ activeContexts(): string[]; /** * Wall-clock estimate of when this context's audio finishes playing out, or * undefined if unknown. Anchors the idle timer to real playout end rather than * chunk-arrival (TTS streams faster than realtime). */ playoutEnd(contextId: string): number | undefined; /** The most-recently-added still-active context (insertion order), or "" if none. */ latestActive(): string; clear(): void; private cancelRelease; } //# sourceMappingURL=tts-playout-clock.d.ts.map