How do I concatenate two .wav files in R?
I’ve checked sound and audio packages and I still don’t know how to do it.
How do I concatenate two .wav files in R? I’ve checked sound and audio
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Have you tried
appendSample(s1, s2, ...)withsaveSample(s, filename, overwrite)in sound package (CRAN) ?appendSample:
Description: Append two or more Sample objects or wav files. Usage: appendSample(s1, s2, ...) Arguments: s1, s2, ... Sample objects, or the names of wav files. Details: If the samples have different sample parameters (bits, rate and channels), the command fitSampleParameters is called to adjust them before the sample are appended. Value: a Sample object with the samples played one after the other.saveSample:
Description: Save a Sample object to disk as a wav file. Usage: saveSample(s, filename, overwrite=FALSE) Arguments: s a Sample object. filename a string giving the path and the name of the destination file. overwrite logical. If FALSE and filename already exists, an error will be reported. Otherwise the old file will be deleted.Example commands:
I downloaded two sample wav files and it works (wavs are concatenated). Of course you need to install sound library to do that.