vak.common.annotation#

Functions

audio_filename_from_path(path[, audio_ext])

Find the name of an audio file within a filename by removing extensions until finding an audio extension, then return the name of that audio file without the extension (i.e., the "stem").

files_from_dir(annot_dir, annot_format)

Get all annotation files of a given format from a directory or its sub-directories, using the file extension associated with that annotation format.

format_from_df(dataset_df)

Get the format of annotations from a dataset, given a dataframe representing that dataset.

from_df(dataset_df[, annot_root])

Get list of annotations from a dataframe representing a dataset.

has_unlabeled(annot, duration)

Returns True if an annotated sequence has unlabeled segments.

map_annotated_to_annot(annotated_files, ...)

Map annotated files, i.e. audio or spectrogram files, to their corresponding annotations.

Exceptions

AudioFilenameNotFoundError

Error raised when a name of an audio filename cannot be found within another filename.

MapUsingExtensionError

Error raised when vak.annotation._map_using_ext() cannot map the filename of an annotation file to the name of an annotated file

MapUsingNotatedPathError

Error raised when vak.annotation._map_using_notated_path() cannot map the filename of an annotation file to the name of an annotated file