|
|
Hi,
I am trying to implement a matlab code which outputs wideband speech
from narrowband speech. It is basically high frequency regeneration. It
involves LP analysis of speech, following which the WB LPC's are
predicted using a VQ Codebook and the WB residue is estimated using a
whitening filter.
I have understood from theory that I have to frame my speech using a
Hamming or Hanning window before LP Analysis. I know that I can form a
window using the window func w = hamming(n), however, I fail to
understand how I can apply this window to my speech. Do i simply
multiply the speech to the window in time domain or do I have to
perform some operation on the speech before windowing? I am in the
process of learning matlab and my questions might seem very naive, so
plz help.
I have a few more issues in the code th at i am trying to implement but
I guess its better to go one step ata time.
The code I got so far is:
%------------------------------------------------------------------
% WIDEBAND ENHANCEMENT USING LP and CODEBOOK
%------------------------------------------------------------------
% STEP 1 : To obtain a NB Signal from a WB signal by DEGRADING
%------------------------------------------------------------------
Fs = 16000;% Sampling frequency in Hz
Fhp = 3500;% Cut off frequency for the high pass filter
Flp = 3400; % Cut off frequency for the low pass filter
x = wavread('G:\Thesis stuff\wavefiles\man1_wb.wav'); % Reads wave file
into matlab
y = downsample(x,2);
%plot (y);
%wavwrite(y,16000,'G:\Thesis stuff\wavefiles\test3.wav');
d = fdesign.bandpass('n,fc1,fc2', 10, 300, 3400, 16000)
y = butter(d,y);
%freqz(y);
%title('DEGRADED / BANDPASS FILTERED SIGNAL');
%------------------------------------------------------------------
% To frame the degraded / NB signal using a Hamming Window
%------------------------------------------------------------------
% Make a window (same for each frame)
w = hamming(160);
% This is the windowed signal.
wy = diag(sparse(w)) * y;
the last line gives me errors.
PLZ Help....
|
|