Filter löschen
Filter löschen

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

17 Ansichten (letzte 30 Tage)
Mona
Mona am 15 Nov. 2014
Kommentiert: Mona am 17 Nov. 2014
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

Akzeptierte Antwort

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

Weitere Antworten (1)

Mona
Mona am 15 Nov. 2014
Bearbeitet: Star Strider am 15 Nov. 2014
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 Kommentare
Star Strider
Star Strider am 15 Nov. 2014
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 am 17 Nov. 2014
Thanks Star,
I am reading the document now and starting to figure out the numbers :)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Time-Frequency Analysis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by