www.pudn.com > wavelet-pujian.rar > Uthwp.m
%使用小波的语音增强算法,消除噪声后信噪比很高,但是语音的失真也很大。
%虽然消噪效果不是特别好,但作为小波域语音增强的起点算法,还是很有研究
%价值的。不过,我个人认为,小波降噪的发展潜力不够大,我试了很多方法用于调整阈值
%效果已经有了明显改善,但最终不如频域降噪的效果理想。
%统一阈值算法,采用软阈值降噪
x=wavread('wx9db.wav');
%Global thresholding.
tt=wpdec(x(1:2048)',5,'sym8');
t=wpdec(x,5,'sym8');
% Node by node thresholding.
t2 = t;
sorh = 's';
thrtmp = wthrmngr('wp1ddenoGBL','sqtwologswn',tt);
thr=thrtmp;
tn = leaves(t);
for k=1:length(tn)
node = tn(k);
cfs = read(t,'data',node);
cfsx=read(tref,'data',node);
cfs=wthresh(cfs,'s',thr);
t2 = write(t2,'data',node,cfs);
end
xo1=wprec(t2);
wavwrite(xo1,8000,16,'声音结果\wxwputho9db.wav');
display('over');