The Frequency-dependent Acoustic Diversity Index by Xu et al. (2023) obtains a floating noise profile before calculating the Acoustic Diversity Index and it doesn't use normalized spectrogram. Alternatively it can take a noise sample to reduce noise in the analyzed files.
Usage
fadi_folder(
folder = NULL,
recursive = recursive,
list = NULL,
start = 0,
end = 1,
unit = "minutes",
save_csv = TRUE,
csv_name = "fadi_results.csv",
noise_file = NULL,
NEM = 2,
min_freq = 200,
max_freq = 10000,
threshold_fixed = -50,
freq_step = 1000,
gamma = 13,
props = FALSE,
n.cores = -1
)
Arguments
- folder
a path to the folder with audio files to import.
- recursive
Logical. Whether to search in subfolders. Default is TRUE.
- list
An optional list (subset) of files in the folder to analyze. If provided, files outside the list will be excluded.
- start
numerical. Where to start reading the Wave.
- end
numerical. Where to end reading the Wave.
- unit
character. Unit of measurement for 'start' and 'end'. Options are 'samples', 'seconds', 'minutes', 'hours'. Default is 'minutes'.
- save_csv
logical. Whether to save a csv in the working directory.
- csv_name
character vector. When 'save_csv' is TRUE, optionally provide a file name.
- noise_file
An R object of class Wave containing noise-only information if needed. Default = NULL.
- NEM
Numeric. Options are 1 or 2. When NEM = 1, floating thresholds are estimated based on noise_file. When NEM = 2, floating thresholds are calculated based on sound file using an automatic noise level estimation method (median of each row in the spectrogram). Default = 2.
- min_freq
Minimum frequency in Hertz when calculating the global threshold. Default = 200.
- max_freq
Maximum frequency in Hertz when calculating the FADI value. Default = 10000.
- threshold_fixed
A negative number in dB for calculating the global threshold. Default = −50.
- freq_step
Bandwidth of each frequency band, in Hertz. Default = 1000.
- gamma
A positive number in dB for calculating the floating thresholds. Default = 13.
- props
Logical; if TRUE, the energy proportion values for each frequency band and channel are added to the output tibble. Default = TRUE.
- n.cores
The number of cores to use for parallel processing. Use
n.cores = -1
to use all but one core. Default is NULL (single-core processing).
Details
Modified version of the Frequency-dependent Acoustic Diversity Index by Xu et al. (2023). FADI was introduced in: https://www.sciencedirect.com/science/article/pii/S1470160X23010828. This version returns a wide format (one row per audio file) tibble as output instead of a nested list. To see the original version as in the paper, use the frequency_dependent_acoustic_diversity() function.