MATLAB Answers

Split .wav file into equal time segments

15 ビュー (過去 30 日間)
Shaula Garibbo
Shaula Garibbo 2019 年 10 月 15 日
回答済み: Star Strider 2019 年 10 月 15 日
Aim: write a code that will split a 1800 second long audio file into separate 60 second files.
I have this so far which creates a series of files consisting of the first 60, 120, 180 (etc.) seconds of the original .wav file. Am I missing something obvious or just approaching this in the wrong way?
for k = 1:60:1800
samples = [1, k*fs];
clear y fs;
[y, fs] = audioread(wavfile, samples);
filename = sprintf('VAALCO01-%d.wav', k);
audiowrite(filename,y,fs);
end

  0 件のコメント

Sign in to comment.

採用された回答

Star Strider
Star Strider 2019 年 10 月 15 日
Use the Signal Processing Toolbox buffer function.

  0 件のコメント

Sign in to comment.

その他の回答 (0 件)


Translated by