Bioacoustics in RI have developed several (bio)acoustic analysis tools in the R programming environment. The advantage of R over most common sound analysis software (e.g. Raven, SAP, Avisoft) is its higher flexibility, which allows the implementation of custom made analyses that better fit the research questions and the characteristics of the vocalizations. Most of the tools are now available in the R packages warbleR, Rraven, baRulho and dynaSpec. I also share R code for bioacoustic analysis on the Bioacoustic in R blog.
|
<
>
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:
The package offers functions to:
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. In addition, warbleR satisfies the need for rigorous open source bioacoustic analysis, which facilitates opportunities for use in research and innovation of additional custom analyzes. Install/load the package from CRAN as follows:
To install the latest developmental version from github you will need the R package devtools:
For details and example usage, visit the warbleR package website. A full description of the package can be found in this journal article. 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. PDF NOTE: please also cite the tuneR and seewave packages if you use any spectrogram-creating or acoustic-measuring functions
Install/load the package from CRAN as follows:
To install the latest developmental version from github you will need the R package devtools:
Please cite baRulho as follows: Araya-Salas, M. (2020), baRulho: quantifying habitat-induced degradation of (animal) acoustic signals in R. R package version 1.0.0. The Currently, most analyses in Raven cannot be run in the background from a command terminal. Thus, most Install/load the package from CRAN as follows:
To install the latest developmental version from github you will need the R package devtools:
The package vignette provides detailed examples for each function in
The animations explaining additional steps in Raven are shown in more detail on the github version of this vignette, which can be downloaded as follows (saves the file “Rraven.github.html” in your current working directory):
The downloaded file can be opened by any internet browser. Please cite Araya-Salas. (2020), Rraven: connecting R and Raven bioacoustic software. R package version 1.0.9.
Install/load the package from CRAN as follows:
To install the latest developmental version from github you will need the R package devtools:
Please cite NatureSounds as follows: Araya-Salas, M. (2018), NatureSounds: a collection of animal sound for bioacoustic analysis in the R environment. R package version 1.1.0. A set of tools to generate dynamic spectrogram visualizations in video format. FFMPEG must be installed in order for this package to work. The package relies heavily on the packages seewave and tuneR. Install/load the package from CRAN as follows:
To install the latest developmental version from github you will need the R package devtools:
ExamplesTo run the following examples you will also need to load a few more packages as well as warbleR 1.1.24 (currently as the developmental version on github). It can be installed as follows:
A dynamic spectrogram of a canyon wren song with a viridis color palette:
Black and white spectrogram:
A spectrogram with black background (colbg = “black”):
Slow down to 1/2 speed (speed = 0.5) with a oscillogram at the bottom (osc = TRUE):
Long-billed hermit song at 1/5 speed (speed = 0.5), removing axes and looping 3 times (loop = 3:
Visualizing a northern nightingale wren recording from xeno-canto using a custom color palette:
Spix’s disc-winged bat inquiry call slow down (speed = 0.05):
Further customizationThe argument ‘spectro.call’ allows to insert customized spectrogram visualizations. For instance, the following code makes use of the
The male part is shown in green and the female part in yellow. We can wrap the
This option can be mixed with any of the other customizations in the function, as adding an oscillogram:
A viridis color palette:
Or simply a gray scale:
The ‘spectro.call’ argument can also be used to add annotations. To do this we need to wrap up both the spectrogram function and the annotation functions (i.e.
Finally, the argument ‘annotation.call’ can be used to add static labels (i.e. non-scrolling). It works similar to ‘spectro.call’, but requires a call from
The argument accepts more than one labels as in a regular
Please cite dynaSpec as follows: Araya-Salas M & M. Wilkins. (2020), dynaSpec: dynamic spectrogram visualizations in R. R package version 1.0.0. |