baRulho R package


Quantifying habitat-induced degradation
of animal sounds


Marcelo Araya-Salas (University of Costa Rica)
Erin E. Grabarczyk (Valdosta State University)
Marcos Quiroz-Oliva (University of Costa Rica)
Adrián García-Rodríguez (University of Vienna)
Alejandro Rico-Guevara (University of Washington)

Sound degradation and signal evolution

  • Sound degrades during propagation

  • Signal structure expected to be finely tuned by natural selection

Sound degradation experiments

Usual steps:

Sound degradation experiments

Usual steps:

R package baRulho

Facilitate implementing sound degradation experiments:

Objectives


1. Showcase study: effects of habitat and signal structure on transmission using synthesized sounds


2. Compare baRulho and Sigpro

Synthesize animal-like sounds

Varying features: frequency, duration, amplitude and frequency modulation

synth_est <- synth_sounds(frequencies = c(1, 2, 3),
                durations = c(0.1, 0.2),
                fm = TRUE, am = TRUE)
                
master_annotations <- master_sound_file(X = synth_data)

Automated alignment of re-recorded files

markers_position <- find_markers(X = master_annotations, 
                                 test.files = "path_to_files")
                                 
markers <- align_test_files(X = master_annotations,
                        Y = markers_position)                    

Automated alignment of re-recorded files

markers_position <- find_markers(X = master_annotations, 
                                 test.files = "path_to_files")

markers <- align_test_files(X = master_annotations,
                        Y = markers_position)                    

Check alignment

plot_aligned_sounds(test_sounds_est)

Visualize degradation

plot_degradation(test_sounds_est)

Visualize degradation

plot_blur_ratio(test_sounds_est)

Quantify degradation

8 degradation measures:

- Attenuation
- Reverberation
- Distortion

degrad <- blur_ratio(test_sounds_est) |>
    envelope_correlation(test_sounds_est) |>
    excess_attenuation(test_sounds_est) |>
    signal_to_noise_ratio(test_sounds_est, mar = 0.01) |>
    tail_to_signal_ratio(test_sounds_est, mar = 0.01) |>
    cross_correlation(test_sounds_est) |>
    spectrum_blur_ratio(test_sounds_est) |>
    spectrum_correlation(test_sounds_est)

Degradation, habitat and acoustic structure

degradation metric ~ habitat + freq + duration + am + fm

Degradation, habitat and acoustic structure

degradation metric ~ habitat + freq + duration + am + fm

baRulho vs Sigpro

  • Sigpro: 861 min
  • baRulho: 7 min (~120x faster)

R package baRulho

Takeaways

  • Adequate quantification


  • Good performance


  • Expanded toolkit

Acknowledgements

  • Centro de Investigación en Neurociencias, Universidad de Costa Rica
  • Lab Biocomputines, Universidad de Costa Rica
  • Bioacustics in R Workshop, Instituto de Biología, Universidad Nacional Autónoma de México (2019)
  • Mariano Araya & Luis Sandoval, PhD
  • Packages seewave and tuneR