ertk.preprocessing.vad_trim.VADTrimmerConfig

class ertk.preprocessing.vad_trim.VADTrimmerConfig(method: Method = Method.librosa, top_db: int = 60, energy_thresh: float = 2.5, freq_thresh: float = 150, sf_thresh: float = 10, window: float = 0.01, debug: bool = False, min_speech: int = 5, min_silence: int = 10)

Bases: ERTKConfig

VAD trimming configuration.

__init__(method: Method = Method.librosa, top_db: int = 60, energy_thresh: float = 2.5, freq_thresh: float = 150, sf_thresh: float = 10, window: float = 0.01, debug: bool = False, min_speech: int = 5, min_silence: int = 10) None

Methods

__init__([method, top_db, energy_thresh, ...])

Inherited Methods

default()

Create default config.

from_config(config)

Create config object from any compatible config.

from_file(path)

Create config from YAML file and optionlly override some values.

merge_with_args(args)

Merge config with command-line arguments.

merge_with_config(config)

Merge other config into this config.

to_dictconfig()

Convert config to DictConfig.

to_file(path)

Write config to YAML file.

to_string()

Generate YAML string representation of config.

Attributes

debug

Whether to plot debug figures.

energy_thresh

Energy threshold for MH2009 VAD.

freq_thresh

Frequency threshold for MH2009 VAD.

method

VAD trimming method.

min_silence

Minimum number of consecutive silence frames to keep.

min_speech

Minimum number of consecutive speech frames to keep.

sf_thresh

Spectral flatness threshold for MH2009 VAD.

top_db

Top decibel threshold for librosa VAD.

window

Window size in seconds for MH2009 VAD.

debug: bool = False

Whether to plot debug figures.

energy_thresh: float = 2.5

Energy threshold for MH2009 VAD.

freq_thresh: float = 150

Frequency threshold for MH2009 VAD.

method: Method = 'librosa'

VAD trimming method.

min_silence: int = 10

Minimum number of consecutive silence frames to keep.

min_speech: int = 5

Minimum number of consecutive speech frames to keep.

sf_thresh: float = 10

Spectral flatness threshold for MH2009 VAD.

top_db: int = 60

Top decibel threshold for librosa VAD.

window: float = 0.01

Window size in seconds for MH2009 VAD.