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

📄 a.zip.txt

📁 数字语音编码 关于数字的语音编译码程序 进行数模转换
💻 TXT
字号:
x=wavread('d:\111\110\a.wav',1024);
figure,plot(x);title(1)


y=wavread('d:\111\110\a.wav',1000);
a1=hamming(1000);
a2=fft(y.*a1);
a3=real(a2);
figure,plot(a3);title(2)


z=wavread('d:\111\110\a.wav',[1,500]);
han=hamming(100);
En=conv(han,abs(z));
figure,plot(En);title(3)


w=wavread('d:\111\110\a.wav',1024);
h=hamming(1000);
En=conv(h,w.*w);
figure,plot(En);title(4)

k=wavread('d:\111\110\a.wav',[1000,2000]);
han=hamming(1000);
for i=1:1000
if k(i)>=0
b(i)=1;
else
b(i)=-1;
end
end
for i=2:1000
 x(i)=b(i)-b(i-1);
end
 z=conv(abs(x),han);
 Zn=z./2000;
 figure,plot(Zn);title(5)


x=wavread('d:\111\110\a.wav',1000);
a1=xcorr(x);
figure,plot(a1);title(6)


yc(1) = 0;            
step = 0.0001;
x=wavread('d:\111\110\a.wav',1000);
a1=xcorr(x);
figure,plot(a1);title(7)
for n=1:1000
    d(n)= x(n)-yc(n);
    if d(n)>0 
        c(n)=0;  
    else
        c(n)=1;
    end 
    if n>1
        if (c(n)==c(n-1))    
            step=2*step;
        else
            step=0.5*step;
        end
    end
    if d(n)>0    
        yc(n+1) = yc(n)+step;
    else
        yc(n+1)=yc(n)-step;
    end
end
for n = 1:1000
     if n>1
        if c(n)==c(n-1)    
           step=2*step;
        else
           step=0.5*step;
        end
    end
  if n==1
        if ( c(n) == 0 )
             R(n) = step;
        else
             R(n) =-step;
        end
    else
        if ( c(n) == 0 )
             R(n) = R(n-1)+step;
        else
             R(n) = R(n-1)-step;
        end
    end
end
figure,plot(R);title(8)


x=wavread('d:\111\110\a.wav',1024);
step=0.0001;   
yc(1)=0;       
for n=1:1000
  d(n)= x(n)-yc(n);
  if d(n)>0
      d1(n)=step;
      c(n)=0;
  else
      d1(n)=-step;
      c(n)=1;
  end
  yc(n+1)=yc(n)+d1(n);
end
for n=1:1000
    if c(n)==0
      yc(n+1)=yc(n)+step;
    else
       yc(n+1)=yc(n)-step;
    end
end
figure,plot(yc);title(9)


a=wavread('d:\111\110\a.wav');
a1=fft(a);
a2=abs(a1);
a3=log(a2);
a4=ifft(a3);
a5=real(a4);
figure,plot(a5);title(10)


a=wavread('d:\111\110\a.wav');
a1=spectrum(a);
figure,plot(a1);title(11)

⌨️ 快捷键说明

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