import type { Config } from '../config/schema.js'; import type { NotesService } from '../notes/service.js'; import type { STTResult } from '../voice/stt/types.js'; import { type AudioRange } from './audio-repair.js'; import type { DiscussionCapture } from './types.js'; export interface DiscussionSealerDeps { processRecordingJob?: () => Promise; notes: NotesService; getConfig: () => Config; transcribeRecording?: (filePath: string, capture: DiscussionCapture, signal?: AbortSignal) => Promise<{ text: string; language?: string; }>; transcribeSegment?: (audio: Buffer, signal: AbortSignal) => Promise; requestTimeoutMs?: number; segmentSeconds?: number; mergeShortTailSeconds?: number; concurrency?: number; skipSilence?: boolean; perChunkMaxAttempts?: number; bestEffortOnExhaustedGaps?: boolean; onUpdated?: (capture: DiscussionCapture) => void; } export declare function formatGapPlaceholderText(startedAtMs: number, endedAtMs: number): string; /** Subdivide a missing range into bounded windows while merging any short tail into the previous window. */ export declare function planGapWindows(range: AudioRange, segmentMs: number, mergeShortTailMs: number): AudioRange[]; export declare class DiscussionSealer { private readonly deps; private readonly intervalMs; private readonly owner; private timer?; private running; private recordingRunning; private stopping; private controller?; constructor(deps: DiscussionSealerDeps, intervalMs?: number); start(): void; stop(): Promise; tick(now?: number): Promise; private sealWhenReady; private resolveOptions; private transcribeFullRecording; } /** Retranscribe a single failed/placeholder segment directly from the saved original audio. */ export declare function retrySingleDiscussionSegment(input: { capture: DiscussionCapture; segment: { sequence: number; startedAtMs: number; endedAtMs: number; }; notes: NotesService; getConfig: () => Config; transcribeSegment?: (audio: Buffer, signal: AbortSignal) => Promise; signal?: AbortSignal; }): Promise<{ text: string; provider: string; speakerLabel?: string; }>;