Learn R Programming

warbleR: Streamline Bioacoustic Analysis

warbleR is intended to facilitate the analysis of the structure of animal acoustic signals in R. Users can collect open-access avian recordings or enter their own data into a workflow that facilitates spectrographic visualization and measurement of acoustic parameters. warbleR makes use of the fundamental sound analysis tools of the seewave package, and offers new tools for acoustic structure analysis. These tools are available for batch analysis of acoustic signals.

The main features of the package are:

  • Diverse tools for measuring acoustic structure
  • The use of loops to apply tasks through acoustic signals referenced in a selection table
  • The production of images in the working directory with spectrograms to allow users organize data and verify acoustic analyses

The package offers functions to:

  • Explore and download Xeno‐Canto recordings
  • Explore, organize and manipulate multiple sound files
  • Detect signals automatically (in frequency and time) (but check the R package ohun for a more thorough and friendly implementation)
  • Create spectrograms of complete recordings or individual signals
  • Run different measures of acoustic signal structure
  • Evaluate the performance of measurement methods
  • Catalog signals
  • Characterize different structural levels in acoustic signals
  • Statistical analysis of duet coordination
  • Consolidate databases and annotation tables

Most of the functions allow the parallelization of tasks, which distributes the tasks among several processors to improve computational efficiency. Tools to evaluate the performance of the analysis at each step are also available.

Installing

Install/load the package from CRAN as follows:

install.packages("warbleR")

# load package
library(warbleR)

To install the latest developmental version from github you will need the R package remotes:

remotes::install_github("maRce10/warbleR")

# load package
library(warbleR)

Usage

Take a look at the package vignettes with detailed examples on how to organize functions in an acoustic analysis workflow.

A full description of the package (although a bit outdated) can be found in this journal article.

Other packages

The packages seewave and tuneR provide a huge variety of functions for acoustic analysis and manipulation. They moslty works on wave objects already imported into the R environment. The package baRulho focuses on quantifying habitat-induced degradatio of acoustic signals with data inputs and ouputs similar to those of warbleR. The package Rraven facilitates the exchange of data between R and Raven sound analysis software (Cornell Lab of Ornithology) and can be very helpful for incorporating Raven as the annotating tool into acoustic analysis workflow in R. The package ohun works on automated detection of sound events, providing functions to diagnose and optimize detection routines. dynaSpec is allows to create dynamic spectrograms (i.e. spectrogram videos).

Citation

Please cite warbleR as follows:

Araya-Salas, M. and Smith-Vidaurre, G. (2017), warbleR: an r package to streamline analysis of animal acoustic signals. Methods Ecol Evol. 8, 184-191.

NOTE: please also cite the tuneR and seewave packages if you use any spectrogram-creating or acoustic-measuring functions

Copy Link

Version

Install

install.packages('warbleR')

Monthly Downloads

1,188

Version

1.1.32

License

GPL (>= 2)

Last Published

August 19th, 2024

Functions in warbleR (1.1.32)

compare_methods

Assessing the performance of acoustic distance measurements
check_sels

Check selection data frames
check_sound_files

Check sound files
catalog2pdf

Combine catalog images into pdfs
comp_matrix

Example matrix listing selections to be compared by cross_correlation
color_spectro

Highlight spectrogram regions
consolidate

Consolidate (sound) files into a single directory
by_element_est

Convert a by-song extended selection table to by-element
cross_correlation

Time-frequency cross-correlation
catalog

Create catalogs of vocal signals
duration_sound_files

Measure the duration of sound files
cut_sels

Cut selections into individual sound files
freq_DTW

Acoustic dissimilarity using dynamic time warping on dominant frequency contours
fix_wavs

Fix .wav files to allow importing them into R
fix_extended_selection_table

Fix extended selection tables
envelope

Calculates the absolute amplitude envelope
filter_sels

Subset selection data frames based on manually filtered image files
find_clipping

Find clipped selections
ffDTW

Deprecated functions and function names
freq_range

Detect frequency range iteratively
inflections

Count number of inflections in a frequency contour
warbleR-internals

warbleR Internal Functions
full_spectrogram2pdf

full_spectrogram2pdf combines full_spectrograms images in .jpeg format to a single pdf file.
is_extended_selection_table

Class 'extended_selection_table': selection table containing wave objects
freq_range_detec

Detect frequency range on wave objects
freq_ts

Extract frequency contours as time series
full_spectrograms

Create long spectrograms of entire sound files
image_to_wave

Convert images into wave objects
overlapping_sels

Find overlapping selections
mp32wav

Convert .mp3 files to .wav
gaps

Gap duration
open_wd

Open working directory
multi_DTW

A wrapper on dtwDist for comparing multivariate contours
make.selection.table

Old name for selection_table
info_sound_files

Get sound file parameter information
map_xc

Maps of 'Xeno-Canto' recordings by species
is_selection_table

Class 'selection_table': double-checked frequency/time coordinates of selections
lbh_selec_table

Example data frame of selections (i.e. selection table).
query_xc

Access 'Xeno-Canto' recordings and metadata
mfcc_stats

Calculate descriptive statistics on Mel-frequency cepstral coefficients
move_images

Move/copy image files between directories
phylo_spectro

Add spectrograms onto phylogenetic trees
rbind.extended_selection_table

rbind method for class extended_selection_table
print.extended_selection_table

print method for class extended_selection_table
read_sound_file

An extended version of read_wave that reads several sound file formats and files from selection tables
plot_coordination

Coordinated singing graphs
print.xcorr.output

print method for class xcorr.output
print.selection_table

print method for class selection_table
rbind.selection_table

rbind method for class selection_table
querxc

alternative name for query_xc
resample_est

Resample wave objects in a extended selection table
rename_est_waves

Rename wave objects and associated metadata in extended selection tables
remove_silence

Remove silence in wave files
sig2noise

Measure signal-to-noise ratio
read_wave

A wrapper for tuneR's readWave that read sound files listed within selection tables
simulate_songs

Simulate animal vocalizations
remove_channels

Remove channels in wave files
selection_table

Create 'selection_table' and 'extended_selection_table' objects
snr_spectrograms

Spectrograms with background noise margins
[.selection_table

extract method for class selection_table
split_sound_files

Splits sound files
spectrograms

Spectrograms of selected signals
song_analysis

Calculates acoustic parameters at the song level
tailor_sels

Interactive view of spectrograms to tailor selections
sound_pressure_level

Measure relative sound pressure level
[.extended_selection_table

extract method for class extended_selection_table
sim_coor_sing

Simulated coordinated singing events.
sth_annotations

Example data frame of annotations from a Scale-throated hermit song (i.e. selection table).
spectro_analysis

Measure acoustic parameters in batches of sound files
sort_colms

Sort columns in a more intuitive order
track_harmonic

Track harmonic frequency contour
wav_2_flac

Convert .wav files to .flac
test_coordination

Randomization test for singing coordination
track_freq_contour

Spectrograms with frequency measurements
wpd_features

Measure wavelet packet decomposition features (EXPERIMENTAL)
tweak_spectro

Plot a mosaic of spectrograms with varying display parameters
warbleR_options

Setting warbleR options
warbleR

warbleR: A package to streamline bioacoustic analysis