/** * Parser for ffmpeg's `silencedetect` filter output. * * The filter writes pairs of lines to stderr: * [silencedetect @ 0x...] silence_start: 1.234 * [silencedetect @ 0x...] silence_end: 2.456 | silence_duration: 1.222 * * If the recording ends mid-silence, the closing `silence_end` is omitted. * We close it ourselves using the optional `totalSec` parameter. */ export interface SilenceRange { startSec: number; endSec: number; durSec: number; } /** * Parse silencedetect lines into ranges. Robust to interleaved ffmpeg log * lines, partial buffers, and unterminated final silences. * * @param stderr Combined ffmpeg stderr text. * @param totalSec Total media duration. If the last detected silence has no * matching `silence_end`, it's closed at totalSec. */ export declare function parseSilenceDetect(stderr: string, totalSec?: number): SilenceRange[]; /** * Convert silence ranges (in seconds) to frame-aligned ranges. Rounds INWARD * — start ceils, end floors — so the resulting cut never trims into speech. */ export declare function silencesToFrameRanges(silences: SilenceRange[], fps: number): Array<{ startFrame: number; endFrame: number; }>; /** * Compute the inverse: "keep" ranges between silences. Convenient for the * agent which mostly cares about what to KEEP (those become EDL events). * * Pads each keep range outward by `paddingSec` (clamped to neighbours and * total duration) so cuts don't slice the first/last syllable. */ export declare function keepRangesFromSilences(silences: SilenceRange[], totalSec: number, paddingSec?: number): SilenceRange[]; //# sourceMappingURL=silence.d.ts.map