vak.common.files.spect#

Functions

find_audio_fname(spect_path[, audio_ext])

finds name of audio file in a path to a spectrogram file, if one is present.

is_valid_set_of_spect_files(spect_paths, ...)

validate a set of spectrogram files that will be used as a dataset. Validates that: - all files contain a spectrogram array that can be accessed with the specified key - the length of the frequency bin array in each file equals the number of rows in the spectrogram array - the frequency bins are the same across all files - the length of the time bin array in each file equals the number of columns in the spectrogram array - the duration of a spectrogram time bin is the same across all files.

load(spect_path[, spect_format])

load spectrogram and related arrays from a file, return as an object that provides Python dictionary-like access

timebin_dur(spect_path, spect_format[, ...])

get duration of time bins from a spectrogram file