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
silenceswithintotal, widened bypaddingand without ranges shorter thanminKeep. -
parseSilences(
String log, Duration total) → List< TimeRange> -
Parses
silence_start/silence_endlines from FFmpeg output into ranges withintotal. A silence still open at the end runs tototal. -
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
startandend(file time) that contain sound louder thannoiseDb. Pauses shorter thanminSilenceare kept, and every kept range is widened bypaddingso words are not clipped. Returns an empty list when the whole range is silent.