wav_info is a wrapper for selection_table that returns wave file information
wav_info(path = NULL, parallel = 1, pb = TRUE)
| path | Character string containing the directory path where the sound files are located.
If |
|---|---|
| parallel | Numeric. Controls whether parallel computing is applied. It specifies the number of cores to be used. Default is 1 (i.e. no parallel computing). |
| pb | Logical argument to control progress bar and messages. Default is |
A data frame with descriptive information about the wave files in the working directory (or 'path'). See "details".
This function is a wrapper for selection_table that returns a data frame with the following descriptive parameters for each wave file in the working directory (or 'path'):
duration: duration of selection in seconds
sample.rate: sampling rate in kHz
channels: number of channels
bits: bit depth
wav.size: wave file size in MB
samples: number of samples in the sound file
Araya-Salas, M., & Smith-Vidaurre, G. (2017). warbleR: An R package to streamline analysis of animal acoustic signals. Methods in Ecology and Evolution, 8(2), 184-191.
{ data(list = c("Phae.long1", "Phae.long2", "Phae.long3", "Phae.long4", "lbh_selec_table")) writeWave(Phae.long1, file.path(tempdir(), "Phae.long1.wav")) writeWave(Phae.long2, file.path(tempdir(), "Phae.long2.wav")) writeWave(Phae.long3, file.path(tempdir(), "Phae.long3.wav")) writeWave(Phae.long4, file.path(tempdir(), "Phae.long4.wav")) #get info wav_info(path = tempdir()) }#> all selections are OK but some have very few samples (less than 20, potentially problematic for some analyses) #> Check 'min.n.samples' column#> sound.files duration sample.rate channels bits wav.size samples #> 1 Cryp.soui-1.wav 1.00000000 9.0 1 16 0.035156 9000 #> 2 Cryp.soui-2.wav 1.00000000 9.0 1 16 0.035156 9000 #> 3 Cryp.soui-3.wav 1.00000000 9.0 1 16 0.035156 9000 #> 4 Cryp.soui-4.wav 1.00000000 9.0 1 16 0.035156 9000 #> 5 Cryp.soui-5.wav 1.00000000 9.0 1 16 0.035156 9000 #> 6 Cryp.soui-6.wav 1.00000000 9.0 1 16 0.035156 9000 #> 7 Cryp.soui-7.wav 1.00000000 9.0 1 16 0.035156 9000 #> 8 Cryp.soui-8.wav 1.00000000 9.0 1 16 0.035156 9000 #> 9 Cryp.soui-9.wav 0.00044444 9.0 1 16 0.000000 4 #> 10 Cryp.soui.wav 8.00044444 9.0 1 16 0.281250 72004 #> 11 Phae.long1-1.wav 1.00000000 22.5 1 16 0.087891 22500 #> 12 Phae.long1-2.wav 1.00000000 22.5 1 16 0.087891 22500 #> 13 Phae.long1-3.wav 0.50004444 22.5 1 16 0.043945 11251 #> 14 Phae.long1.2-1.wav 1.00000000 22.5 2 16 0.087891 22500 #> 15 Phae.long1.2-2.wav 1.00000000 22.5 2 16 0.087891 22500 #> 16 Phae.long1.2-3.wav 0.50004444 22.5 2 16 0.043945 11251 #> 17 Phae.long1.2.wav 2.50004444 22.5 2 16 0.219727 56251 #> 18 Phae.long1.wav 2.50004444 22.5 1 16 0.219727 56251 #> 19 Phae.long2-1.wav 1.00000000 22.5 1 16 0.087891 22500 #> 20 Phae.long2-2.wav 0.70004444 22.5 1 16 0.061523 15751 #> 21 Phae.long2.wav 1.70004444 22.5 1 16 0.149414 38251 #> 22 Phae.long3-1.wav 1.00000000 22.5 1 16 0.087891 22500 #> 23 Phae.long3-2.wav 1.00000000 22.5 1 16 0.087891 22500 #> 24 Phae.long3-3.wav 0.20000000 22.5 1 16 0.017578 4500 #> 25 Phae.long3.wav 2.20000000 22.5 1 16 0.193359 49500 #> 26 Phae.long4-1.wav 1.00000000 22.5 1 16 0.087891 22500 #> 27 Phae.long4-2.wav 1.00000000 22.5 1 16 0.087891 22500 #> 28 Phae.long4-3.wav 1.00000000 22.5 1 16 0.087891 22500 #> 29 Phae.long4-4.wav 0.20000000 22.5 1 16 0.017578 4500 #> 30 Phae.long4.wav 3.20000000 22.5 1 16 0.281250 72000 #> 31 wv1-1.wav 1.00000000 22.5 1 16 0.087891 22500 #> 32 wv1-2.wav 1.00000000 22.5 1 16 0.087891 22500 #> 33 wv1-3.wav 1.00000000 22.5 1 16 0.087891 22500 #> 34 wv1-4.wav 1.00000000 22.5 1 16 0.087891 22500 #> 35 wv1-5.wav 1.00000000 22.5 1 16 0.087891 22500 #> 36 wv1-6.wav 1.00000000 22.5 1 16 0.087891 22500 #> 37 wv1-7.wav 1.00000000 22.5 1 16 0.087891 22500 #> 38 wv1-8.wav 0.20008889 22.5 1 16 0.017578 4502 #> 39 wv1.wav 7.20008889 22.5 1 16 0.632812 162002