## 一、简介

1、小波分解

2、模极大值去噪法

3、相关去噪法

4、阈值去噪法
1995年，阂值去噪法首次由Donob。提出，他提出的非线性小波变换阈值去噪[Ca)使得小波去噪得到深人研究和广泛应用。

5、混合去噪法

## 二、源代码

``````clear all;
%读入语音文件%
%定义参数%
winsize=256;
n=0.04;
size=length(speech);
numofwin=floor(size/winsize);
ham=hamming(winsize)';
hamwin=zeros(1,size);
enhanced=zeros(1,size);
x=speech'+n* randn(1,size);
noisy=n* randn(1,winsize);
N=fft(noisy);
nmag=abs(N);
%分帧%
for q=1:2*numofwin-1
frame=x(1+(q-1)* winsize/2:winsize+(q-1)* winsize/2);
hamwin(1+(q-1)* winsize/2:winsize+(q-1)* winsize/2)=...
hamwin(1+(q-1)* winsize/2:winsize+(q-1)* winsize/2)+ham;
y=fft(frame.* ham);
mag=abs(y);
phase=angle(y);
%幅度谱减%
for i=1:winsize
if mag(i)- nmag(i)>0
clean(i)=mag(i)- nmag(i);
else
clean(i)=0;
end
end
%在频域中重新合成%
spectral=clean.* exp(j* phase);
%反傅里叶变换并重叠相加%
enhanced(1+(q-1)* winsize/2:winsize+(q-1)* winsize/2)=...
enhanced(1+(q-1)* winsize/2:winsize+(q-1)* winsize/2)+real(ifft(spectral));
end
%除去汉明窗引起的增益%
for i=1:size
if hamwin(i)==0
enhanced(i)=0;
else
enhanced(i)=enhanced(i)/hamwin(i);
end
end
recoefs1(i)=sgn(recoefs1(i))*(0.003*abs(recoefs1(i))-0.000003)/0.002;
otherwise recoefs1(i)=recoefs1(i);
end
elseif output1(i)==0
recoefs1(i)=recoefs1(i);
end
end
count5=fix(count3/zhen);
for i=1:count5
n=160*(i-1)+1:160+160*(i-1);
s=sound(n);
w=hamming(160);
sw=s.*w;
a=aryule(sw,10);
sw=filter(a,1,sw);
sw=sw/sum(sw);
r=xcorr(sw,'biased');
corr=max(r);
if corr>=0.8
output2(i)=0;
elseif corr<=0.1
output2(i)=1;
end
end
for i=1:count5
n=160*(i-1)+1:160+160*(i-1);
if output2(i)==1
switch abs(recoefs2(i))
case abs(recoefs2(i))<=0.002
recoefs2(i)=0;
case abs(recoefs2(i))>0.002 & abs(recoefs2(i))<=0.003
recoefs2(i)=sgn(recoefs2(i))*(0.003*abs(recoefs2(i))-0.000003)/0.002;
otherwise recoefs2(i)=recoefs2(i);
end
elseif output2(i)==0
recoefs2(i)=recoefs2(i);
end
end``````