import type { AudioAnalysis, CandidateScore, NoiseAnalysis, RestorationPlan } from "../types/audio.js"; import { type RestorationPlanOptions } from "./restoration-plan.js"; import { type TempSession } from "../utils/temp.js"; import type { Logger } from "../utils/logger.js"; export type CandidateId = "conservative" | "target" | "maximum"; export declare const CANDIDATE_IDS: readonly CandidateId[]; export interface CandidatePreviews { conservative: string; target: string; maximum: string; /** The same window, untouched — the reference candidates are scored against. */ original: string; } export declare function buildCandidatePlans(analysis: AudioAnalysis, noise: NoiseAnalysis, baseOptions: RestorationPlanOptions): Record; /** * Pick a preview window that contains performance rather than a gap, so the * candidates are judged on how they treat the music. */ export declare function pickPreviewWindow(durationSeconds: number | null): { start: number; len: number; }; export declare function renderCandidatePreviews(options: { inputPath: string; analysis: AudioAnalysis; noise: NoiseAnalysis; plans: Record; temp: TempSession; logger: Logger; }): Promise; /** * Score candidates on what was actually measured, not on how much the level * dropped. A gross RMS fall cannot tell noise removal from music removal — the * two look identical in a single number. */ export declare function scoreRestorationCandidates(options: { originalPath: string; previews: CandidatePreviews; plans: Record; mode: RestorationPlan["mode"]; beforeNoise: NoiseAnalysis; sampleRate: number | null; }): Promise; /** * Least-destructive candidate that meets the removal target. * Falls back to best overall score if none meet the target. */ export declare function selectRestorationCandidate(scores: CandidateScore[]): CandidateId;