Linear predictive coding (LPC) of speech - Forward线性预测编码(LPC)语音了.docx
《Linear predictive coding (LPC) of speech - Forward线性预测编码(LPC)语音了.docx》由会员分享,可在线阅读,更多相关《Linear predictive coding (LPC) of speech - Forward线性预测编码(LPC)语音了.docx(20页珍藏版)》请在课桌文档上搜索。
1、SpeechProcessingProject1.inearPredictivecodingusingVoiceexcitedVocoderECE5525OsamaSarairehFall2005Dr.VetonKepuskaThebasicformofpitchexcitedLPCvocoderisshownbelowThespeechsignalisfilteredtonomorethanonehalfthesystemsamplingfrequencyandthenA/Dconversionisperformed.Thespeechisprocessedonaframebyframeba
2、siswheretheanalysisframelengthcanbevariable.Foreachframeapitchperiodestimationismadealongwithavoicingdecision.AlinearpredictivecoefficientanalysisisperformedtoobtainaninversemodelofthespeechspectrumA(z).InadditionagainparameterG,representingsomefunctionofIhespeechenergyiscomputed.Anencodingprocedure
3、isthenappliedfortransformingtheanalyzedparametersintoanefficientsetoftransmissionparameterswiththegoalofminimizingthedegradationinthesynthesizedspeechforaspecifiednumberofbits.Knowingthetransmissionframerateandthenumberofbitsusedforeachtransmissionparameters,onecancomputeanoise-freechanneltransmissi
4、onbitrate.Atthereceiver,thetransmittedparametersaredecodedintoquantizedversionsofthecoeifficentanalysisandpitchestimationparameters.Anexcitationsignalforsynthesisisthenconstructedfromthetransmittedpitchandvoicingparameters.Theexcitationsignalthendrivesasynthesisfilter1/A(z)correspondingtotheanalysis
5、modelA(z).Thedigitalsampless(n)arethenpassedthroughanD/Aconverterandlowpassfilteredtogeneratethesyntheticspeechs(t).Eitherbeforeoraftersynthesis,thegainisusedtomatchthesyntheticspeechenergytotheactualspeechenergy.Thedigitalsamplesaretheconvertedtoananalogsignalandpassedthroughafiltersimilartotheonea
6、ttheinputofthesystem.LMearDrediCtiVeCOdin父(LPC)OfSDeeChThelinearpredictivecoding(LPC)methodforspeechanalysisandsynthesisisbasedonmodelingtheVocaltractasalinearAll-Pole(IIR)filterhavingthesystemtransferfunction:T = pitd periodimpulse trainInnovationsu(n)。UVSpeech SignalLPC FilterWI)whitenoisesimplesp
7、eechproductionWherepisthenumberofpoles,GisthefilterGain,andakaretheparametersthatdeterminethepoles.Therearetwomutuallyexclusivewaysexcitationfunctionstomodelvoicedandunvoicedspeechsounds.Forashorttime-basisanalysis,voicedspeechisconsideredperiodicwithafundamentalfrequencyofFo,andapitchperiodoflFo,wh
8、ichdependsonthespeaker.Hence,Voicedspeechisgeneratedbyexcitingtheallpolefiltermodelbyaperiodicimpulsetrain.Ontheotherhand,unvoicedsoundsaregeneratedbyexcitingtheall-polefilterbytheoutputofarandomnoisegenerator.Thefundamentaldifferencebetweenthesetwotypesofspeechsoundscomesfromthewaytheyareproduced.T
9、hevibrationsofthevocalcordsproducevoicedsounds.Therateatwhichthevocalcordsvibratedictatesthepitchofthesound.Ontheotherhand,unvoicedsoundsdonotrelyonthevibrationofthevocalcords.Theunvoicedsoundsarecreatedbytheconstrictionofthevocaltract.Thevocalcordsremainopenandtheconstrictionsofthevocaltractforceai
10、routtoproducetheunvoicedsoundsGivenashortsegmentofaspeechsignal,letssayabout20msor160samplesatasamplingrate8KHz,thespeechencoderatthetransmittermustdeterminetheproperexcitationfunction,thepitchperiodforvoicedspeech,thegain,andthecoefficients3pk.Theblockdiagrambelowdescribestheencoder/decoderfortheLi
11、nearPredictiveCoding.Theparametersofthemodelaredeterminedadaptivelyfromthedataandmodeledintoabinarysequenceandtransmittedtothereceiver.Atthereceiverpoint,thespeechsignalisthesynthesizedfromthemodelandexcitationsignal.Theparametersoftheall-polefiltermodelaredeterminedfromthespeechsamplesbymeansofline
12、arprediction.TobespecifictheoutputofIheLinearPredictionfilterisPS()=工ap(k)s(nk)k=landthecorrespondingerrorbetweentheobservedsampleS(n)andthepredictedvalueAs(h)ise(h)=s(ri)一s(h)byminimizingthesumofthesquarederrorwecandeterminethepoleparameters/7(Jofthemodel.Theresultofdifferentiatingthesumabovewithre
13、specttoeachoftheparametersandequationtheresulttozero,isasepofplinearequationsP%(Z)Q(机幻=_噎(MWherem=I2.pk=whereGS(Mpresenttheautocorrelationofthesequence$()definedasNQ(M=s()s5+m)H=OtheequationabovecanbeexpressedinmatrixformasRd=一曝whereRSSaisapxpautocorrelationmatrix,GsiSaPXlautocorrelationvector,andai
14、sapx1vectorofmodelparameters.rowcol=size(data);ifcol=1data=data;endnfrane=0;msfr=round(srl(X)Ofr);%Convertmstosamplesmsfs=round(sr/1000*fs);%Convertmstosamplesduration=Iength(data);speech=filler01-preemp,1,data);%Preemphasizespeechnsoverlap=msfs-nsfr;ramp=0:1/(nsoverlap-1):1J;%Computepartofwindowfor
15、frameindex=1:msfr:duration-msfs+1%framerate=20rnsframeData=speech(frameindex:(frameIndex+ms-1);%framesize=3Omsnframe=nfrane+l;CiiitoCor=XcorriframeData);%ComputethecrosscorrelationautoCorVec=autoCor(msfs+0:LJ);TheseequationscanbesolvedinMATLBbyusingtheLevinson-Durbinalgorithm.%Levinsonsmethoderr(1)=
16、autoCorVec(I);k(l)=O;=;farindex=1:Lnumerator=/7A.*autoCorVec(index+1:-1:2);denominator=-1*err(index);k(index)=nuneratordenoninator;%PARCORcoeffsA=A+k(index)*flipud(八);k(index)J;err(index+l)=(1-k(index)2)*err(index);Thegainparameterofthefiltercanbeobtainedbytheinput-outputrelationshipasfollowPs(n)=-Z
17、a,(k)s(n一2)+Gx()k=lwhereX(n)representtheinputsequence.WecanfurthermanipulatethisequationandintermsoftheerrorsequencewehavePGx(n)=s(n)+ap(k)s(n-k)=e(n)k=thenNTNTG2x2(n)=e2(n)n=0n=0iftheinputexcitationisnormalizedtounitenergybydesign,thenN-IN-IPG2x2(n)=e25)=(0)+XaP(Z)Q(k)n=0n=()k=lwhereG2issetequaltot
18、heresidualenergyresultingfromtheleastsquareoptimization.%filterresponseifgain=0;cft=O:(1/255):1;forindex=1:Lgain=gain+aCoeffindex,nframe)*exp(-i*2*pi*cft).index;endgain=abs(!./gain);spec(:,nframe)=20*logl0(gain(l:128),;plot(20*lOg10(gain);title(nframe);drawnow;endifimplseResponse=filter(l,aCoeff(:,n
19、frame),/1zeros(l,255)J);freqResp=20*logl0(abs(ffi(ImpidseResponse);plot(freqResp);endoncetheLPCcoefficientsarecomputed,wecandetermineweathertheinputspeechframeisvoiced,andifitisindeedvoicedsound,thenwhatisthepitch.Wecandeterminethepitchbycomputingthefollowingsequenceinmatlab:P小)=W(k)%(-k)k=whwrera(k
20、)isdefinedasfollowPra(n)=aa(k)ap(i+k)k=lwhichisdefinedastheautocorrelationsequenceofthepredictioncoefficients.Thepitchiddetectedbyfindingthepeakofthenormalizedsequencere(11)(0)Inthetimeintervalcorrespondsto3to15msinthe20mssamplingframe.Ifthevalueofthispeakisatleast0.25,theframeofspeechisconsideredvo
21、icedwithaMNP)F?ypitchperiodequaltothevalueof-p,where丫()isamaximumvalue.Ifthepeakvalueislessthan0.25,theframespeechisconsideredunvoicedandthepitchwouldequaltozero.errSig=filter(lA,IJrameData);%findexcitationnoiseG(nframe)=sqrt(err(L+l);%gainautoCorErr=xcorr(errSig);%calculatepitch&voicinginformationB
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Linear predictive coding LPC of speech Forward线性预测编码LPC语音了 LPC Forward 线性 预测 编码 语音
链接地址:https://www.desk33.com/p-929179.html