Applying hamming window and pre-emphasis filter on speech signal in frame by frame analyzing

2 views (last 30 days)
I am working on speech signals.I want to add hamming window and pre-emphasis filter on my speech signal. Here What I built. [ip] = audioread('D:\chant_1.wav'); fs=44100; t=(0:length(ip)-1)/fs; plot(t,ip); frame_duration=0.01; N=length(ip); frame_length=frame_duration*fs;
dir =['D:\Simulation_data\']; cd(dir)
for k=1:num_frames frame=ip((k-1)*frame_length+ 1 : frame_length*k);
%Window the speech segment using a Hamming window.
xi = frame.*hamming(length(frame))
%Get linear prediction filer
ncoeff=2+fs/1000;
eq=lpc(frame,ncoeff);
[h,f]=freqz(1,eq,512,fs);
r=roots(eq);
r=r(imag(r)>0.01);
ffreq=sort(atan2(imag(r),real(r))*fs/(2*pi));
length(ffreq);
fid = fopen('f5 chant.dat','at');
for j=6
fprintf(fid,'%6.8f\n',ffreq(j)) ;
end
fclose(fid) ;
end
Thank you

Answers (1)

Saad Rehman
Saad Rehman on 19 Apr 2019
chamee Gunawardene , hi, have you got the solution of your above asked query?

Community Treasure Hunt

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

Start Hunting!