vak.config.spect_params.SpectParamsConfig#

class vak.config.spect_params.SpectParamsConfig(fft_size=512, step_size=64, freq_cutoffs=None, thresh=None, transform_type=None, spect_key='s', freqbins_key='f', timebins_key='t', audio_path_key='audio_path')[source]#

Bases: object

represents parameters for making spectrograms from audio and saving in files

fft_size#

size of window for Fast Fourier transform, number of time bins. Default is 512.

Type:

int

step_size#

step size for Fast Fourier transform. Default is 64.

Type:

int

freq_cutoffs#

of two elements, lower and higher frequencies. Used to bandpass filter audio (using a Butter filter) before generating spectrogram. Default is None, in which case no bandpass filtering is applied.

Type:

tuple

transform_type#

one of {‘log_spect’, ‘log_spect_plus_one’}. ‘log_spect’ transforms the spectrogram to log(spectrogram), and ‘log_spect_plus_one’ does the same thing but adds one to each element. Default is None. If None, no transform is applied.

Type:

str

thresh#

threshold minimum power for log spectrogram.

Type:

int

spect_key#

key for accessing spectrogram in files. Default is ‘s’.

Type:

str

freqbins_key#

key for accessing vector of frequency bins in files. Default is ‘f’.

Type:

str

timebins_key#

key for accessing vector of time bins in files. Default is ‘t’.

Type:

str

audio_path_key#

key for accessing path to source audio file for spectogram in files. Default is ‘audio_path’.

Type:

str

__init__(fft_size=512, step_size=64, freq_cutoffs=None, thresh=None, transform_type=None, spect_key='s', freqbins_key='f', timebins_key='t', audio_path_key='audio_path') None#

Method generated by attrs for class SpectParamsConfig.

Methods

__init__([fft_size, step_size, ...])

Method generated by attrs for class SpectParamsConfig.