Plug the labels from a set of annotations (made by annotator_app) in a dataset of slices (made by slice_wavs).

label_slices(slices_dir, annotations, pattern = NULL)

Arguments

slices_dir

atomic character. Path to dir where the slices are (see slice_wavs).

pattern

atomic character. A regex pattern to select files from 'slices_dir'. Useful to filter out just specifc types of labels (see examples).

annotations_dir

atomic character or a tibble. If character, path to dir where the annotations are. If tibble, a tibble created by tidy_annotations.

Value

tibble of slices with label column.

Examples

slices_dir <- system.file("wav_sample_slices_1000ms", package = "mestrado") annotations_dir <- system.file("annotations", package = "mestrado") slices_1000ms_labels <- label_slices( slices_dir, annotations_dir, pattern = "Glaucidium|Megascops-atricapilla" )