SmartCutService class abstract final

Finds the parts of a clip where someone is talking, so the silent gaps can be cut out (the "jump cut" every talking-head reel uses).

Runs FFmpeg's silencedetect on the device: free, offline and fast, because only the audio is decoded.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

keepRanges(List<TimeRange> silences, Duration total, {Duration padding = const Duration(milliseconds: 120), Duration minKeep = const Duration(milliseconds: 300)}) → List<TimeRange>
The complement of silences within total, widened by padding and without ranges shorter than minKeep.
parseSilences(String log, Duration total) → List<TimeRange>
Parses silence_start / silence_end lines from FFmpeg output into ranges within total. A silence still open at the end runs to total.
speechRanges(String path, {required Duration start, required Duration end, double noiseDb = -32, Duration minSilence = const Duration(milliseconds: 550), Duration padding = const Duration(milliseconds: 120), Duration minKeep = const Duration(milliseconds: 300)}) → Future<List<TimeRange>>
Ranges of the file between start and end (file time) that contain sound louder than noiseDb. Pauses shorter than minSilence are kept, and every kept range is widened by padding so words are not clipped. Returns an empty list when the whole range is silent.