0
点赞
收藏
分享

微信扫一扫

通过‘IIR‘低通数字滤波器处理音频噪声

求索大伟 2022-05-02 阅读 81
matlab

%对音频取样

in_put= 'D:\MATALAB\yinyue.wav';

[x,fs] = audioread(in_put);

plot(x);

 

%播放带啸声的音频

%syms x fs;

%syms in_put;

%info=audioinfo(in_put)  ;

%sound(x,fs);

 

%对语音信号进行FFT得到频谱

x=x(:,1);

FS=length(x);

X=fft(x);

t=(0:FS-1)/fs;

figure(1)

subplot(2,1,1);plot(t,x);

title('原始语音信号时域波形');

xlabel('时间');

ylabel('赋值');

grid on;

subplot(2,1,2);plot(abs(X));

title('原始语音信号频谱');

xlabel('频率');

ylabel('幅度');

axis([0 1000000 0 8]);

grid on;

 

%利用ellipord设计低通IIR滤波器

Fp=1500;

Fs=1200;

Ft=8000;

As=100;

Ap=1;

wp=2*pi*Fp/Ft;

ws=2*pi*Fs/Ft;

[n,wn]=ellipord(wp,ws,Ap,As,'s');

[b,a]=ellip

举报

相关推荐

0 条评论