vak.prep.unit_dataset.unit_dataset#

Functions for making a dataset of units from sequences, as used to train dimensionality reduction models.

Functions

abspath(a_path)

Convert a path to an absolute path

prep_unit_dataset(audio_format, output_dir, ...)

Prepare a dataset of units from sequences, e.g., all syllables segmented out of a dataset of birdsong.

save_spect(spect_to_save, output_dir)

Save a spectrogram array to an npy file.

spectrogram_from_segment(segment, spect_params)

Compute a spectrogram given a Segment instance.

Classes

Segment(data, samplerate, onset_s, offset_s, ...)

Dataclass that represents a segment from segmented audio or spectrogram.

SpectToSave(spect, ind, audio_path)

A spectrogram to be saved.