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

📄 语音的倒谱分析.txt

📁 欢迎光临程序员联合开发网(www.pudn.com)
💻 TXT
字号:
%求语音的倒谱分析,p231(数字语音处理)。 
clc; 
tic, 
[y,fs]=wavread('d:\MATLAB701\work\sound\A.wav'); 
L=length(y)/512; 
for i=1:L 
    y1=y(1+(i-1)*512:i*512).*hamming(512); 
%y1=y(1:1024).*hamming(1024); 
t=(1/fs:1/fs:length(y1)/fs)*1000; 
subplot(221);plot(t,y1);axis tight; 
x=fft(y1); 
for i=1:length(x)-1; 
    if x(i,1)==0 
    x(i,1)=x(i+1,1); 
    end 
end 
a=2*log2(abs(x)); 
%a=fftshift(a);%平移频率谱。 
%f=((1:(length(a)/2))/fs)*1000; 
subplot(222); 
%plot(f,a(1:length(a)/2));axis tight; 
plot(a(1:length(a)/2)); 
b=ifft(a); 
t=(1/fs:1/fs:length(b)/2/fs)*1000;  % ms 
subplot(223);plot(t,b(1:length(b)/2));axis tight; 
%subplot(224);plot(abs(b));axis tight; 
axis tight; 
%怎么用升余弦窗??? 
t=1:size(b)/8; 
xy=(1+cos(2*pi*(t-100)/100))/2; 
%b2=b(1:length(t)).*xy'; 
%plot(b); 
%figure;plot(b2);axis tight; 
pause 
clc; 
end 
toc,

⌨️ 快捷键说明

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