Efficiently computing a LARGE spectrogram

Hello,
I need to creat a spectrogram of a 6 minutes WAV file of 44100 Hz sampling rate. This is my code at the moment:
[s,fs] = audioread(...); % read the mono file
window = blackmanharris(2048);
noverlap = 1024*3/2;
nfft = fs/5; % for about 5Hz resolution, also tried 2^13 or 2^14
[~,f,t,p] = spectrogram(s,window,noverlap,nfft,fs);
but the computation never finishes and I need to kill Matlab. I think the system is running out of memory (8GB on OS X ).
Is there a way to make it finish?

2 个评论

Do you need 5Hz resolution? That sounds pretty small for frequencies up to 44100. Maybe it is needed though. I work with seismic signals personally where sample frequencies there are more like 250-1000 Hz so I'm not familiar with signals of your length and sample rate.
You could also try reducing the overlap, but if you want that level of quality you may have to do it in chunks instead of all in one go.
It is a windowed transform so can clearly be broken down into sections that can be run independently of each other.
Breaking it down into sections is a good idea! Thank you!

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Time-Frequency Analysis 的更多信息

产品

提问:

2015-3-10

评论:

2015-3-10

Community Treasure Hunt

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

Start Hunting!

Translated by