Streamline Bioacoustic Analysis

Functions aiming to facilitate the analysis of the structure of animal acoustic signals in 'R'. 'warbleR' makes use of the basic sound analysis tools from the packages 'tuneR' and 'seewave', and offers new tools for exploring and quantifying acoustic signal structure. The package allows users to organize and manipulate multiple sound files, create spectrograms of complete recordings or individual signals in different formats, run several measures of acoustic structure, and characterize different structural levels in acoustic signals (Araya-Salas and Smith-Vidaurre 2017 ).


warbleR: Streamline Bioacoustic Analysis

CRANstatus Totaldownloads Lifecycle:stable Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped. Codecov testcoverage Dependencies License: GPLv3 PaperDOI

warbleR logo

warbleR is an R package for analyzing the structure of animal acoustic signals at scale. Bring your own recordings (or open-access ones from repositories like Xeno-canto, easily obtained with suwo), annotate them in a selection table, and run the whole pipeline β€” from file wrangling and spectrograms to acoustic measurements and similarity analyses β€” in batch, on as many signals as you have.

Built on top of seewave and tuneR, warbleR adds the workflow layer those packages leave to the user:

  • πŸ—‚οΈ Selection-table-driven workflows β€” every function loops over the signals listed in an annotation table, so one call handles one sound or ten thousand
  • πŸ“¦ Extended selection tables β€” a single R object that bundles annotations and the audio clips, making analyses portable and easy to share
  • ⚑ Parallel processing β€” most functions take a parallel argument to spread the work across cores
  • πŸ” Built-in quality checks β€” spectrogram images and diagnostic tools let you verify each step before moving on

What can you do with it?

Task Key functions
Inspect, convert and fix sound files info_sound_files(), check_sound_files(), fix_wavs(), mp32wav(), wav_2_flac(), split_sound_files(), remove_channels()
Build and validate annotation tables selection_table(), check_sels(), tailor_sels(), cut_sels(), overlapping_sels(), consolidate()
Create spectrograms spectrograms(), full_spectrograms(), color_spectro(), snr_spectrograms(), catalog(), phylo_spectro()
Measure acoustic structure spectro_analysis(), mfcc_stats(), song_analysis(), freq_range(), sig2noise(), sound_pressure_level(), gaps(), wpd_features()
Track frequency contours freq_ts(), track_freq_contour(), track_harmonic(), inflections()
Compare signals cross_correlation(), freq_DTW(), multi_DTW(), waveform_similarity(), compare_methods()
Analyze duet / chorus coordination test_coordination(), plot_coordination()
Simulate signals simulate_songs()

See the function reference for the full list.

Installation

From CRAN:

install.packages("warbleR")

Development version from GitHub (requires remotes):

remotes::install_github("maRce10/warbleR")

Quick example

The example recordings and annotations come from the NatureSounds package (installed with warbleR):

library(warbleR)

# load example long-billed hermit songs and their annotations
data(list = c("Phae.long1", "Phae.long2", "Phae.long3", "Phae.long4", "lbh_selec_table"))

# save the sound files to a temporary folder
for (i in paste0("Phae.long", 1:4)) {
  tuneR::writeWave(get(i), file.path(tempdir(), paste0(i, ".wav")))
}

# check that annotations and sound files match
check_sels(lbh_selec_table, path = tempdir())

# measure spectral and temporal parameters for every annotated signal
params <- spectro_analysis(lbh_selec_table, path = tempdir())

# pairwise acoustic similarity via spectrographic cross-correlation
xc <- cross_correlation(lbh_selec_table, path = tempdir())

Learn more

  • πŸ“˜ Intro to warbleR β€” an overview of the package
  • πŸ“ Annotation data format β€” how input annotations (selection tables) should look
  • πŸ” All vignettes β€” worked examples of complete analysis workflows
  • πŸ“„ Original paper in Methods in Ecology and Evolution (the package has grown a lot since, so check the vignettes for current usage)

Related packages

Package What it does
seewave & tuneR Core sound analysis and manipulation of wave objects in R
ohun Automated detection of sound events, with tools to diagnose and optimize detection routines
suwo Search, download and map nature media (Xeno-canto, Macaulay Library, iNaturalist, GBIF, WikiAves) β€” replaces warbleR’s query_xc() and map_xc()
baRulho Quantifying habitat-induced degradation of acoustic signals, with inputs/outputs compatible with warbleR
Rraven Data exchange between R and Raven (Cornell Lab of Ornithology), handy for using Raven as the annotation tool
dynaSpec Dynamic spectrograms (spectrogram videos)
NatureSounds Example recordings and annotations of animal sounds

Getting help & contributing

Found a bug or have a feature request? Please open an issue. Contributions are welcome β€” see the contributing guidelines.

Citation

If you use warbleR, please cite:

Araya-Salas, M. & Smith-Vidaurre, G. (2017). warbleR: an R package to streamline analysis of animal acoustic signals. Methods in Ecology and Evolution, 8, 184–191. https://doi.org/10.1111/2041-210X.12624

Please also cite tuneR and seewave if you use any function that creates spectrograms or measures acoustic parameters. You can get all citations from R with citation("warbleR").

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("warbleR")

1.1.38 by Marcelo Araya-Salas, 12 days ago


https://marce10.github.io/warbleR/, https://github.com/maRce10/warbleR


Report a bug at https://github.com/maRce10/warbleR/issues/


Browse source code at https://github.com/cran/warbleR


Authors: Marcelo Araya-Salas [aut, cre] (ORCID: , Grace Smith-Vidaurre [aut]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports dtw, fftw, graphics, grDevices, monitoR, parallel, pbapply, stats, utils, methods, Rcpp, knitr, bioacoustics, cli, httr, curl

Depends on tuneR, seewave, NatureSounds

Suggests testthat, ggplot2, rmarkdown, jpeg, ape, soundgen, wavethresh, png, pracma, Sim.DiffProc, kableExtra, covr, V8, viridis

Linking to Rcpp

System requirements: fftw3, GNU make, sox, Ghostscript, libsndfile, FLAC (optional)


Imported by Rraven, dynaSpec, ohun.

Depended on by baRulho.


See at CRAN