Continuous Spectrogram from multiple wav files.

5 Ansichten (letzte 30 Tage)
Thomas Webber
Thomas Webber am 19 Mai 2020
Kommentiert: Thomas Webber am 19 Mai 2020
Hello all,
I have been scouring the existing online help but cant seem to find exactly what I’m after. I have a folder with hundreds of 4 min wav files and want to produce a single spectrogram which contains them all. My initial thinking was to read in all wav files and somehow join them into one large file to later put into a spectrogram. Any help would be great appreciated!
Thanks,
Thomas

Akzeptierte Antwort

Stijn Haenen
Stijn Haenen am 19 Mai 2020
Something like this:
data_tot=[];
>> for i=1:numel(files)
data=audioread(files(i));
data_tot=[data_tot ; data];
end
audiowrite('file.wav',data_tot,Fs);
  3 Kommentare
Stijn Haenen
Stijn Haenen am 19 Mai 2020
Bearbeitet: Stijn Haenen am 19 Mai 2020
you have to make colomns from your data, you can add some lines to do this:
data_tot=[];
>> for i=1:numel(files)
data=audioread(files(i));
if size(data,1)<2
data=data';
end
data_tot=[data_tot ; data];
end
audiowrite('file.wav',data_tot,Fs);
and you have to check whether all your files are single audio files or double (left and right audio).
Thomas Webber
Thomas Webber am 19 Mai 2020
Thats wonderful, thankyou for your help!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Measurements and Spatial Audio finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by