Learn R Programming

warbleR (version 1.1.2)

mp32wav: Convert .mp3 files to .wav

Description

mp32wav converts several .mp3 files in working directory to .wav format

Usage

mp32wav(samp.rate = 44.1, parallel = 1, path = NULL)

Arguments

samp.rate
Sampling rate at which the .wav files should be written. The maximum permitted is 44.1 kHz (default). Units should be kHz.
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). Not availble in Windows OS.
path
Character string containing the directory path where the sound files are located. If NULL (default) then the current working directory is used.

Value

.wav files saved in the working directory with same name as original mp3 files.

Details

convert all .mp3 files in working directory to .wav format. Function used internally to read .mp3 files (readMP3) sometimes crashes.

Examples

Run this code
## Not run: 
# # First set temporary folder
# setwd(tempdir())
#  
# #Then download mp3 files from xeno-canto
# querxc(qword = "Phaethornis aethopygus", download = TRUE)
# 
# # Convert all files to .wav format
# mp32wav()
# 
# #check this folder!!
# getwd()
# ## End(Not run)

Run the code above in your browser using DataLab