Annotation

‘audio.annotation’ module within the ketos library

This module provides utilities to handle annotations associated with waveform and spectrogram objects.

Contents:

AnnotationHandler class

AnnotationHandler([df])

Class for handling annotations of acoustic data.

add_index_level(df[, key])

Ensure the DataFrame has at least two indexing levels.

convert(x, unit)

Convert a quantity specified as a string with SI units, e.g. "7kg" to a float with the specified unit, e.g. 'g'.

convert_to_Hz(x)

Convert a frequency specified as a string with SI units, e.g. "11kHz" to a float with units of Hz.

convert_to_sec(x)

Convert a time duration specified as a string with SI units, e.g. "22min" to a float with units of seconds.

stack_annotations(handlers[, keys, level])

Create a handler to manage a stack of annotation sets.