卡尔曼滤波用于语音增强的一个经典代码matlab-副本.docx

卡尔曼滤波用于语音增强的一个经典代码matlab-副本.docx

  1. 1、本文档共15页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
卡尔曼滤波用于语音增强的一个经典代码 matlab - 副本 function output=KalmanSignalDenoiser(Noisy,Clean,fs) OUTPUT=KALMANSIGNALDENOISER(NOISY,CLEAN,FS) this purpose of this function is to demonstrate the capability of kalman % filter for denoising noisy speech (corrupted by white noise). Kalman % filtering of noisy speech usually have two steps: 1 . Estimating the AR parameters of speech segment 2 . Filtering the segment There are different approaches for extracting AR parameters of noisy % speech in the literature, however, in this function none is implemented. % Clean speech signal should be provided for this purpose. % ARGUMENTS NOISY : noise contaminated speech CLEAN : clean speech signal FS : Sampling frequency which should be the same for both signals % Output is the denoised speech signal % Required functions: SEGMENT %Sep-04 %Esfandiar Zavarehei W=fix(.025*fs); %Window length is 25 ms SP=1; %Shift percentage is 40% (10ms) %Overlap-Add method works good with this value(.4) SpecP=13; Window=ones(W,1); x=segment(Clean,W,SP,Window); y=segment(Noisy,W,SP,Window); n=segment(Noisy-Clean,W,SP,Window); R=var(n); H=[zeros(1,SpecP-1) 1]; G=H; GGT=G*H; FUpper=[zeros(SpecP-1,1) eye(SpecP-1)]; I=eye(SpecP); [A Q]=lpc(x,SpecP); P=diag(repmat(R(1),1,SpecP)); o=zeros(1,W*size(x,2));% allocating memory to the output in advance save a lot of computation time o(1:SpecP)=y(1:SpecP,1); hwb = waitbar(0,Please wait...,Name,Processing); start=SpecP+1; Sp=o(1:SpecP); t=SpecP+1; for n=1:size(x,2) waitbar(n/size(x,2),hwb,[Please wait... num2str(fix(100*n/size(x,2))) %]) F=[FUpper; fliplr(-A(n,2:end))]; for i=start:W S_=F*Sp; e=y(i,n)-S_(end);%innovation P_=F*P*F+GGT*Q(n); K=(P_*H)/(H*P_*H + R(n)); SOut=S_+K*e; o(t-SpecP+1:t)=SOut; %Notice that the previous SpecP-1 output samples are updated again P=(I-K*H)*P_; Sp=SOut; t=t+1; end start=1; end close(hwb) output=o; function FormantTrack=FTrackSig(signal,fs) F=FTRACKSIG(S) Formant Tracking % Inputs: S, signal, the speech signal with Motorola Format and sampli

文档评论(0)

150****5607 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档