How can I combine multiple wav files into a single new wav file
Show older comments
I have a folder with six 1-minute wav files. I want to have a script that will combine all wav files in a folder into a new 6-minute wav file. I'm super new at matlab and don't know where to start.
Answers (1)
Star Strider
on 10 Sep 2019
0 votes
6 Comments
Benjamin Colbert
on 10 Sep 2019
Walter Roberson
on 10 Sep 2019
[f1, fs] = audioread(first_file);
f2 = audioread(second_file);
combined = [f1;f2];
sound(combined, fs)
Star Strider
on 11 Sep 2019
@Walter — Thank you.
Ideally, they all have tthe same sampling frequency (sampling rate) as well.
Benjamin Colbert
on 11 Sep 2019
Star Strider
on 11 Sep 2019
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!