mp32wav | R Documentation |
mp32wav
converts several .mp3 files in working directory to .wav format
mp32wav(
samp.rate = NULL,
parallel = 1,
path = NULL,
dest.path = NULL,
bit.depth = 16,
pb = TRUE,
overwrite = FALSE
)
samp.rate |
Sampling rate in kHz at which the .wav files should be written. If not provided the sample rate of the original .mp3 file is used. THIS FEATURE IS CURRENTLY NOT AVAILABLE. However, downsampling can be done after .mp3's have been converted using the |
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). |
path |
Character string containing the directory path where the .mp3 files are located.
If |
dest.path |
Character string containing the directory path where the .wav files will be saved.
If |
bit.depth |
Character string containing the units to be used for amplitude normalization. Check
|
pb |
Logical argument to control progress bar. Default is |
overwrite |
Logical. Control whether a .wav sound file that is already in the working directory should be overwritten. |
The function will convert all mp3 files in working directory or 'path' supplied to wav format. bioacoustics package must be installed when changing sampling rates (i.e. if 'samp.rate' is supplied). Note that sound files are normalized using normalize
so they can be written by writeWave
.
convert all .mp3 files in working directory to .wav format. Function used internally to read .mp3 files (readMP3
) sometimes crashes.
.wav files saved in the working directory with same name as original mp3 files.
Marcelo Araya-Salas (marcelo.araya@ucr.ac.cr) and Grace Smith Vidaurre
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.
## Not run:
# download mp3 files from xeno-canto
query_xc(qword = "Phaethornis aethopygus", download = TRUE, path = tempdir())
# Convert all files to .wav format
mp32wav(path = tempdir(), dest.path = tempdir())
# check this folder!!
tempdir()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.