⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 project2-2.m

📁 training and then recognition of a spesified word in MATLAB
💻 M
字号:
% a section of vowel
[x,fs]=wavread('C:\Users\FARZANEH\Desktop\New Folder\bahar.wav');
% fourier transform of windowed signal
Y=fft(x.*hamming(length(x)));
% cepstrum is DFT of log spectrum
C=fft(log(abs(Y)+eps));
% LPC calculation
L=lpc(C,8); 
% getting other sections for training and calculation of cepstrum and LPC
[x1,fs1]=wavread('C:\Users\FARZANEH\Desktop\New Folder\bahar-6.wav');
Y1=fft(x1.*hamming(length(x1)));
C1=fft(log(abs(Y1)+eps));
L1=lpc(C1,8);
[x2,fs2]=wavread('C:\Users\FARZANEH\Desktop\New Folder\bahar-7.wav');
Y2=fft(x2.*hamming(length(x2)));
C2=fft(log(abs(Y2)+eps));
L2=lpc(C2,8);
[x3,fs3]=wavread('C:\Users\FARZANEH\Desktop\New Folder\bahar-8.wav');
Y3=fft(x3.*hamming(length(x3)));
C3=fft(log(abs(Y3)+eps));
L3=lpc(C3,8);
l=(L+L1+L2+L3)/4;
% getting the fifth vowel for recognition
[x4,fs4]=wavread('C:\Users\FARZANEH\Desktop\New Folder\zamin.wav');
Y4=fft(x4.*hamming(length(x4)));
C4=fft(log(abs(Y4)+eps));
L4=lpc(C4,8);
d=(abs(l-L4)).^2;
s=sum(d);
 if (s>0.003)
fprintf('that is not a correct word');
   else 
      fprintf('that is a correct word');
    end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -