unsilence.lib.detect_silence.DetectSilence
Module Contents
Functions
|
Detects silence in a file and outputs the intervals (silent/not silent) as a lib.Intervals.Intervals object |
- unsilence.lib.detect_silence.DetectSilence.detect_silence(input_file: pathlib.Path, **kwargs)
Detects silence in a file and outputs the intervals (silent/not silent) as a lib.Intervals.Intervals object :param input_file: File where silence should be detected :param kwargs: Various Parameters, see below :return: lib.Intervals.Intervals object
- kwargs:
silence_level: Threshold of what should be classified as silent/audible (default -35) (in dB) silence_time_threshold: Resolution of the ffmpeg detection algorithm (default 0.5) (in seconds) short_interval_threshold : The shortest allowed interval length (default: 0.3) (in seconds) stretch_time: Time the interval should be enlarged/shrunken (default 0.25) (in seconds) on_silence_detect_progress_update: Function that should be called on progress update
(called like: func(current, total))