Segmenting, windowing, framing with 50%-75% overlap

17 次查看(过去 30 天)
Hi everyone,
I am very new to matlab so please be patient with me if I sound dumb!!!
I have a project where I am suppose to read a noisy speech and filter it, and I am stuck in the first part. I was able to read the speech and plot it using the following
[x, fs, nbits]= wavread('noisy.wav'); sound(x, fs); timex=(1: length(x))/fs; plot(timex, x); xlabel ('Seconds') ; ylabel ('Amplitude');
where fs = 16000 and length(x) = 159999
Now, I am suppose to do Segmentation , windowing, and framing with a 50%~ 75% overlap in order to take STFT, but I am not able to find a matlab function that will section my matrix x into overlapped frames?!! Can someone help me please!!!!
Thanks

采纳的回答

Star Strider
Star Strider 2014-11-15
If you have the Signal Processing Toolbox, use the spectrogram function. It will do what you want.

更多回答(1 个)

Mona
Mona 2014-11-15
编辑:Star Strider 2014-11-15
Thank you Star Strider,
I've used the spectrogram function as follows:
flength=256;
foverlap=flength/2;
fftlength=flength;
wnd=hamming(flength,'periodic');
[S, F, T, P] = spectrogram (yf, wnd,foverlap, fftlength, fs);
But I still have questions about its return. It returns four things S, F, T, and P . Is S a matrix of rows and columns where the number of columns matches the number of frames? For example, my original yf is 159999 and I took the overlap to be 50% and my fs is 16000. I am not sure how to figure out the length of S and number of frames?
Please help
Thanks
  2 个评论
Star Strider
Star Strider 2014-11-15
My pleasure!
The ‘S’ matrix according to the documentation:
  • Each column of S contains an estimate of the short-term, time-localized frequency content of x. Time increases across the columns of S and frequency increases down the rows.
It is difficult to answer in any detail. You probably need to plot ‘S’ to see what your spectrogram looks like. That may tell you everything you need to know.
In the ‘Examples’ section of the documentation (about the power spectral densities of chirps) is a reasonably detailed discussion of the various variables the spectrogram function returns and how to plot and interpret them.
Mona
Mona 2014-11-17
Thanks Star,
I am reading the document now and starting to figure out the numbers :)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Time-Frequency Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by