




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
語(yǔ)音信號(hào)處理實(shí)驗(yàn)報(bào)告集錦【實(shí)驗(yàn)一】實(shí)驗(yàn)題目Shorttimeanalysis(短時(shí)間分析)實(shí)驗(yàn)要求WriteaMATLABprogramtoanalyzeaspeechandsimultaneously,onasinglepage,plotthefollowingmeasurements:1.theentirespeechwaveform2.theshort-timeenergy,En3.theshort-timemagnitude,Mn4.theshort-timezero-crossing,Zn5.thenarrowbandspectrogram6.thewidebandspectrogramUseboththespeechwaveformsinthewznjdx_normal.wav.Chooseappropriatewindowsizes,windowshifts,andwindowfortheanalysis.Explainyourchoiceoftheseparameters.寫一個(gè)程序來(lái)分析語(yǔ)音的同時(shí),在一個(gè)單頁(yè),情節(jié)如下措施:1。整個(gè)語(yǔ)音波形2。短時(shí)間能量3。短時(shí)幅度,錳4。短時(shí)過(guò)零,鋅5。窄帶語(yǔ)譜圖6。寬帶語(yǔ)譜圖在wznjdx_normal.wav使用語(yǔ)音波形。選擇合適的窗口大小,窗口移動(dòng)和窗口進(jìn)行分析。解釋你對(duì)這些參數(shù)的選擇。實(shí)驗(yàn)程序clear[x,fs]=wavread('wznjdx_normal.wav');n=length(x);N=320;subplot(4,1,1);plot(x);h=linspace(1,1,N);En=conv(h,x.*x);subplot(4,1,2);plot(En);Mn=conv(h,abs(x));subplot(4,1,3);plot(Mn);fori=1:n-1ifx(i)>=0y(i)=1;elsey(i)=-1;endifx(i+1)>=0y(i+1)=1;elsey(i+1)=-1;endw(i)=abs(y(i+1)-y(i));endk=1;j=0;while(k+N-1)<nZm(k)=0;fori=0:N-1Zm(k)=Zm(k)+w(k+i);endj=j+1;k=k+N/2;endforw=1:jQ(w)=Zm(160*(w-1)+1)/(2*N);endsubplot(4,1,4);plot(Q);grid;figure(2);subplot(2,1,1);spectrogram(x,h,256,200,0.0424*fs);subplot(2,1,2);spectrogram(x,h,256,200,0.0064*fs);實(shí)驗(yàn)結(jié)果語(yǔ)譜圖:(Matlab7.0用不了spectrogram)【實(shí)驗(yàn)二】實(shí)驗(yàn)題目Homomorphicanalysis同態(tài)分析實(shí)驗(yàn)要求WriteaMATLABprogramtocomputetherealcepstrumsofasectionofvoicedspeechandunvoicedspeech.Plotthesignal,thelogmagnitudespectrum,therealcepstrum,andthelowpasslifteredlogmagnitudespectrum.寫一個(gè)程序來(lái)計(jì)算實(shí)際倒譜一段濁音和清音。小區(qū)的信號(hào),對(duì)數(shù)幅度譜,真正的倒譜,和低通liftered對(duì)數(shù)幅度譜。三、實(shí)驗(yàn)程序nfft=256;[x,fs]=wavread('wznjdx_normal.wav');fx=x;Xvm=log(abs(fft(fx,nfft)));xhv=real(ifft(Xvm,nfft));lifter=zeros(1,nfft);lifter(1:30)=1;lifter(nfft-28:nfft)=1;fnlen=0.02*fs;%20mswin=hamming(fnlen);%加窗n=fnlen;%窗寬度賦給循環(huán)自變量nnoverlap=0.5*fnlen;while(n<=length(x)-1)fx=x(n-fnlen+1:n).*win;n=n+noverlap;endxhvp=xhv.*lifter';figure;subplot(4,1,1)plot(lifter);title('倒譜濾波器');subplot(4,1,2)plot(x);title('語(yǔ)音信號(hào)波形');subplot(4,1,3)plot(Xvm);title('Xvm');subplot(4,1,4)plot(xhv);title('xhv');四、實(shí)驗(yàn)結(jié)果【實(shí)驗(yàn)三】一、實(shí)驗(yàn)題目LPanalysis線性分析二、實(shí)驗(yàn)要求WriteaMATLABprogramtoconvertfromaframeofspeechtoasetoflinearpredictioncoefficients.PlottheLPCspectrumsuperimposedonthecorrespondingSTFT.寫一個(gè)程序?qū)恼Z(yǔ)音到一組線性預(yù)測(cè)系數(shù)的框架。情節(jié)的LPC譜疊加在相應(yīng)的變換。三、實(shí)驗(yàn)程序clear;[x,fs]=wavread('wznjdx_normal.wav');fx=x(4000:4160-1);p=10;[a,e,k]=aryule(fx,p);G=sqrt(e*length(fx));f=log(abs(fft(fx)));h0=zeros(1,160);h=log(G)-log(abs(fft(a,160)));figure(1);subplot(211);plot(fx);subplot(212);plot(f);holdon;plot((0:160-1),h,'r');四、實(shí)驗(yàn)結(jié)果【實(shí)驗(yàn)四】一、實(shí)驗(yàn)題目Pitchestimation二、實(shí)驗(yàn)內(nèi)容Writeaprogramtoimplementthepitchestimationandthevoiced/unvoiceddecisionusingtheLPC-basedmethod.三、實(shí)驗(yàn)程序clear[x,fs]=wavread('wznjdx_normal.wav');n=length(x);Q=x';NFFT=512;N=256;Hamm=hamming(N);frame=30;M=Q(((frame-1)*(N/2)+1):((frame-1)*(N/2)+N));Frame=M.*Hamm';%lowpassfilter[b2,a2]=butter(2,900/4000);speech2=filter(b2,a2,Frame);%filter%residual[a,e]=lpc(speech2,20);errorlp=filter(a,1,speech2);%residual%Short-termautocorrelation.re=xcorr(errorlp);%Findmaxautocorrelationforlagsintheintervalminlagtomaxlag.minlag=17;%F0:450Hzmaxlag=160;%F0:50Hzfnlen=256;[remax,idx]=max(re(fnlen+minlag:fnlen+maxlag));figuresubplot(3,1,1);plot(Frame);subplot(3,1,2);plot(speech2);subplot(3,1,3);plot(re);text(500,0,'idx');idx=idx-1+minlagremax四、實(shí)驗(yàn)結(jié)果【實(shí)驗(yàn)五】一、實(shí)驗(yàn)題目Speechsynthesis語(yǔ)音合成二、實(shí)驗(yàn)內(nèi)容WriteaprogramtoanalyzeaspeechandsynthesizeitusingtheLPC-basedmethod.寫一個(gè)程序來(lái)分析語(yǔ)音和綜合使用LPC法。三、實(shí)驗(yàn)程序主程序clear;[x,sr]=wavread('wznjdx_normal.wav');p=[1-0.9];x=filter(p,1,x);N=256;inc=128;y=lpcsyn(x,N,inc);wavplay(y,sr);子程序lpcsynfunctiony=lpcsyn(x,N,inc)%[x,sr]=wavread('wznjdx_normal.wav');%pre=[1-0.97];%x=filter(pre,1,x);%N=256;%inc=128;fn=floor(length(x)/inc);y=zeros(1,50000);for(i=1:fn)order=16;x(1:N,i)=x((i-1)*inc+1:(i+1)*inc);[A(i,:),G(i),P(i),fnlen,fnshift]=lpcana(x(1:N,i),order);if(P(i))%Voicedframe.e=zeros(N,1);e(1:P(i):N)=1;%Impulse-trainexcitation.else%Unvoicedframe.e=randn(N,1);%Whitenoiseexcitation.endyt=filter(G(i),A(i,:),e);j=(i-1)*inc+[1:N];y(j)=y(j)+yt';end;end子程序lpcanafunction[A,G,P,fnlen,fnshift]=lpcana(x,order)fnlen=256;fnshift=fnlen/2;n=length(x);[b2,a2]=butter(2,900/4000);speech2=filter(b2,a2,x);[A,e]=lpc(speech2,order);errorlp=filter(A,1,speech2);re=xcorr(errorlp);G=sqrt(e*length(speech2));minlag=17;maxlag=160;[remax,idx]=max(re(n+minlag:n+maxlag));P=idx-1+minlag;end四、實(shí)驗(yàn)結(jié)果【實(shí)驗(yàn)六】一、實(shí)驗(yàn)題目Speechenhancement語(yǔ)音增強(qiáng)二、實(shí)驗(yàn)內(nèi)容Writeaprogramtoimplementthebasicspectralmagnitudesubtraction.編寫一個(gè)程序,實(shí)現(xiàn)基本的譜幅度減法。三、實(shí)驗(yàn)程序clear[speech,fs,nbits]=wavread('wznjdx_normal.wav');%讀入數(shù)據(jù)alpha=0.04;%噪聲水平winsize=256;%窗長(zhǎng)size=length(speech);%語(yǔ)音長(zhǎng)度numofwin=floor(size/winsize);%幀數(shù)hamwin=zeros(1,size);%定義漢明窗長(zhǎng)度enhanced=zeros(1,size);%定義增強(qiáng)語(yǔ)音的長(zhǎng)度ham=hamming(winsize)';%%產(chǎn)生漢明窗x=speech'+alpha*randn(1,size);%信號(hào)加噪聲noisy=alpha*randn(1,winsize);%噪聲估計(jì)N=fft(noisy);nmag=abs(N);%噪聲功率譜%分幀forq=1:2*numofwin-1frame=x(1+(q-1)*winsize/2:winsize+(q-1)*winsize/2);%對(duì)帶噪語(yǔ)音幀間重疊一半取值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);
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 安徽省高考的數(shù)學(xué)試卷
- 2025年中國(guó)特種原子紅色料市場(chǎng)調(diào)查研究報(bào)告
- 2025年中國(guó)水刮刀市場(chǎng)調(diào)查研究報(bào)告
- 2025年中國(guó)氣動(dòng)帶手動(dòng)楔式閘閥市場(chǎng)調(diào)查研究報(bào)告
- 2025年中國(guó)手動(dòng)導(dǎo)線液壓鉗市場(chǎng)調(diào)查研究報(bào)告
- 2025年中國(guó)全自動(dòng)切換柜市場(chǎng)調(diào)查研究報(bào)告
- 2025年中國(guó)PIC仿真器市場(chǎng)調(diào)查研究報(bào)告
- 人教版歷史與社會(huì)七下第五單元第三課《地域差異顯著》教學(xué)設(shè)計(jì)
- 第三單元課題3 元素(2)教學(xué)設(shè)計(jì)-2024-2025學(xué)年九年級(jí)化學(xué)人教版(2024)上冊(cè)
- 籃球運(yùn)傳組合 行進(jìn)間低手投籃技術(shù) 教學(xué)設(shè)計(jì)-2023-2024學(xué)年高一上學(xué)期體育與健康人教版必修第一冊(cè)
- DeepSeek1天開發(fā)快速入門
- 2025書記員招聘考試題庫(kù)及參考答案
- 2024-2025年第二學(xué)期數(shù)學(xué)教研組工作計(jì)劃
- 2025輔警招聘公安基礎(chǔ)知識(shí)題庫(kù)附含參考答案
- 2025年菏澤醫(yī)學(xué)專科學(xué)校高職單招職業(yè)技能測(cè)試近5年??及鎱⒖碱}庫(kù)含答案解析
- 成都四川成都簡(jiǎn)陽(yáng)市簡(jiǎn)城街道便民服務(wù)和智慧蓉城運(yùn)行中心招聘綜治巡防隊(duì)員10人筆試歷年參考題庫(kù)附帶答案詳解
- 2025-2030全球廢棄食用油 (UCO) 轉(zhuǎn)化為可持續(xù)航空燃料 (SAF) 的催化劑行業(yè)調(diào)研及趨勢(shì)分析報(bào)告
- 山東省臨沂市蘭山區(qū)2024-2025學(xué)年七年級(jí)上學(xué)期期末考試生物試卷(含答案)
- 2025年環(huán)衛(wèi)工作計(jì)劃
- 湖北省武漢市2024-2025學(xué)年度高三元月調(diào)考英語(yǔ)試題(含答案無(wú)聽(tīng)力音頻有聽(tīng)力原文)
- 品質(zhì)巡檢培訓(xùn)課件
評(píng)論
0/150
提交評(píng)論