1
votes

I'm trying to plot a proper spectrogram for sound data, in Qt. And now i can plot a nice looking spectrogram with a fft window length 1024 and overlapping data length 976. But it is usual to use small window length to plot spectrogram such as 256, and that ll give me a better time resolution. But when I reduce the window lenght to 256 I get empty rows in the spectrogram. I know that reducing the window length causes low frequency resolution on FFT, but why isn't there any empty rows in spectrograms of other programs. Am I doing something wrong or is this result normal?

Here are the main steps that i use to get the spectrogram: -Get the data from the sound file. -FFT on first window(hanning). -convert the complex fft output into magnitude array( magnitude = sqrt(re^2 + im^2) ) -convert magnitude to log scale(dB) magnitude_dB = 20*log10(magnitude) -plot the first column of the spectrogram by scaling the spectrum data to fix it into the column -move the window 48 samples, for next operation..

You can see the problem on these screen shots: window length 1024 window length 256

(btw my goal is to make a program which can recognize the phonems from speech sound data. Using FFTW library)

I really appreciate any help you can provide.

1
Ask this at : dsp.stackexchange.commotiur

1 Answers

0
votes

The lower resolution of a shorter FFT length also implies a wider bandwidth for each FFT result bin. Thus the spectrograph graph needs thicker row lines to cover the wider bandwidth of each row to fill in the gaps between lines in your plot.