Can I store the spectrogram matrix into a cell for each wav file, read by audioDatastore?
2 views (last 30 days)
Show older comments
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.
0 Comments
Answers (0)
See Also
Categories
Find more on AI for Signals 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!