import { BridgeOptions } from "../bridge/file-bridge.js"; export interface SilenceInterval { start: number; end: number; duration: number; } /** * Parse ffmpeg's silencedetect output. * * silencedetect writes to stderr as `silence_start: 12.5` and * `silence_end: 18.25 | silence_duration: 5.75`. A run of silence that reaches * the end of the file has a start with no matching end, so it is closed at the * media duration. */ export declare function parseSilenceDetectOutput(stderr: string, totalDuration: number | null): SilenceInterval[]; /** Pull the media duration out of ffmpeg's `Duration: 00:00:20.00` banner line. */ export declare function parseDurationSeconds(stderr: string): number | null; /** * Invert the silence ranges into the segments worth keeping. This is what an * actual "strip the dead air" edit needs, and deriving it here avoids every * caller reimplementing the same interval arithmetic. */ export declare function invertToSegments(silences: SilenceInterval[], totalDuration: number | null): SilenceInterval[]; export declare function getAudioTools(bridgeOptions: BridgeOptions): { adjust_audio_levels: { description: string; parameters: { type: "object"; properties: { node_id: { type: string; description: string; }; level_db: { type: string; description: string; }; }; required: string[]; }; handler: (args: { node_id: string; level_db: number; }) => Promise; }; add_audio_keyframes: { description: string; parameters: { type: "object"; properties: { node_id: { type: string; description: string; }; keyframes: { type: string; items: { type: string; properties: { time_seconds: { type: string; description: string; }; level_db: { type: string; description: string; }; }; required: string[]; }; description: string; }; }; required: string[]; }; handler: (args: { node_id: string; keyframes: Array<{ time_seconds: number; level_db: number; }>; }) => Promise; }; mute_track: { description: string; parameters: { type: "object"; properties: { track_index: { type: string; description: string; }; muted: { type: string; description: string; }; }; required: string[]; }; handler: (args: { track_index: number; muted: boolean; }) => Promise; }; detect_silence: { description: string; parameters: { type: "object"; properties: { media_path: { type: string; description: string; }; project_item_id: { type: string; description: string; }; noise_threshold_db: { type: string; description: string; }; min_duration_seconds: { type: string; description: string; }; }; }; handler: (args: { media_path?: string; project_item_id?: string; noise_threshold_db?: number; min_duration_seconds?: number; }) => Promise; }; }; //# sourceMappingURL=audio.d.ts.map