Steps: - 1) create a vector of all species of interest. - 2) decide if want to download mp3 or not. - 3) set directory for mp3 storage.

# list here all the species.
bird_species <- c("megascops choliba",
                  "strix hylophila",
                  "pulsatrix koeniswaldiana",
                  "megascops atricapilla",
                  "glaucidium minutissimum")

# Should the MP3 be downloaded to the hard disk?
download <- TRUE

# insert here which folder do you want to store the mp3 files.
dir <- "dados/mp3_originals"
if(!fs::dir_exists(dir)) fs::dir_create(dir)

Xeno-canto data and MP3

The warbleR::querxc() function retrieve mp3 files from xeno-canto.org repository.

library(warbleR)

# set donwload = TRUE for download the files to your hard disk.
metadata_xc <- tibble::tibble(species = bird_species)
metadata_xc$mp3_xc = purrr::map(bird_species, ~querxc(.x, download = download, path = dir))

Wikiaves data and MP3

The package {wikiaves} is not on CRAN yet. Github install only.

# install.packages("remotes")
# remotes::install_github("Athospd/wikiaves")
library(wikiaves)
# set donwload = TRUE for download the files to your hard disk.
metadata_wa <- bird_species %>% 
  wa_metadata(download = download, path = dir) %>% 
  tidyr::nest(mp3_wa = c(-term))