《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)=-Za