Can I store the spectrogram matrix into a cell for each wav file, read by audioDatastore?

1 view (last 30 days)
X=[];
numFiles=3000;
for i = 1:numFiles
[x,~] = read(ads);
fs = 16000;
frameLength = round(frameDuration*fs);
hopLength = round(hopDuration*fs);
spec = melSpectrogram(x,fs, ...
'WindowLength',frameLength, ...
'OverlapLength',frameLength - hopLength, ...
'FFTLength',640, ...
'NumBands',numBands, ...
'FrequencyRange',[50,8000]);
X{i,:}={spec}
spec=[]
end
Actually I want to store all these spectrogram values for each wav files into cells (such that a cell X has 1X3000 dimention has 3000 cells of dimention 50X140 say )to follow this example and eventually each label into a matrix of 5X3000 ,such that each coloumn has single 1 and rest 0's.

Answers (0)

Community Treasure Hunt

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

Start Hunting!