API Reference#

A core package for acoustic communication research in Python.

This section documents the vocalpy API.

Data types#

Data types for acoustic communication data.

Sound(data, samplerate)

Class that represents a sound.

Spectrogram(data, frequencies, times)

Class that represents a spectrogram.

Annotation(data, path)

Class that represents annotation data.

Segments(start_inds, lengths, samplerate[, ...])

Class that represents a set of line segments returned by a segmenting algorithm.

Features(data)

Class that represents features extracted from sound.

Classes for Pipelines#

Classes for common steps in pipelines.

Segmenter([callback, params])

Class that represents the segmenting step in a pipeline.

SpectrogramMaker([callback, params])

Class that represents the step in a pipeline that makes spectrograms from audio.

FeatureExtractor(callback[, params])

Class that represents the step in a pipeline that extracts features.

Params()

A class to represent the parameters used with a method, that can be unpacked with the ** operator.

Signal processing#

signal

Functions for signal processing.

segment

Algorithms for segmentation.

spectral

Spectral representations.

spectrogram(sound[, n_fft, hop_length, ...])

Get a spectrogram from audio.

Feature Extraction#

feature

Feature extraction

Metrics#

metrics

Metrics for methods and models in acoustic communication.

metrics.segmentation

Metrics for segmentation algorithms.

metrics.segmentation.ir

Metrics for segmentation adapted from information retrieval.

Visualization#

plot

Module for plotting and visualizations.

Example Data#

example(name[, return_path])

Get an example from vocalpy.examples.

examples

Example data built into VocalPy.

examples.ExampleData(**kwargs)

A dict-like container for example data.

Other#

constants

Constants used throughout vocalpy.

validators

Functions for input validation.

paths

Functions for working with paths.