Manipulating wav files in matlab

2 views (last 30 days)
Mark_hu
Mark_hu on 6 Apr 2013
Hey There,
I'm having a little trouble understanding how to undertake these tasks.
I need to read in a wav file:
[y,fs] = wavread('file.wav') % done
Then check the sampling rate down to 3 times less
y1 = decimate(y,3) %done
Then preemphasis on the signal:
y2 = filter([1 -.90],1,y1); % done
Then split this into 20ms time frames with a hamming window and on overlap of 50%
Now fs = 16kHz, therefore to get get 20ms I need to use 320 samples from y2 which contains 160,000 samples.
y3 = buffer(y2,320) %done
This splits up my y2 nicely into 320X500 data.
though if I plot this say to:
plot(y3)
It gives the plot of all 500 samples onto one graph.
do I need to put it into an array?
for i=0:500
y3[i] = buffer(y2,320)
end
though there seems to be syntax errors with that line and it doesn't like it.
I am unsure what to do from here? As i do not know how to manipulate that data now.
I need to use a hamming window to get a overlap of 50%, then calculate the LP coefficents of each frame.
With the overlap I think I can use buffer like this:
buffer(y2,320,160) ??? Which gives me a 50% overlap but unsure about the hamming window part.
From there filter the speech frame with LP coefficents and gain to obtain the residual.
Then reconstruct the signal.
If anyone advise me on where to go from here that would be much appreciated!

Answers (0)

Categories

Find more on Audio Processing Algorithm Design 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!