LAB 1 SINEWAVE SPEECH ANALYSIS/SYNTHESIS IN MATLAB
Estimated time to complete this la! "# mi$%tes
Sebuah percakapan jika dianalisis dan disintesis menggunakan pendekatan sinyal akan memiliki beberapa sinyal sinusoidal yang tergabung manjadi satu. Dengan menganalisis tiga sinyal percakapan yang memiliki keragaman frekuensi dan amplitude yang harmonis bisa menjadi dasar untuk memprediksi suatu percakapan dengan mudah. Pengolahan sinyal seperti ini kini dikenal dengan istilah Sinewave Speech. Di dalam lab ini kita akan menggunakan file-file berikut untuk melakukan proses pengolahan sinyal percakapan: synthtrax.m menyediakan fungsi utama untuk proses sintesis slinterp.m menyediakan fungsi tambahan untuk melakukan interpolasi sinyal secara linier readswi.m menyediakan fungsi untuk membaca file dengan format SWI melalui M!"# s1pars.swi$ s6pars.swi file%file berisi parameter uji CATATAN: Pastikan semua file di atas disimpan dalam satu folder yang tepat. Lab Objectives fter completing this lab$ students &ill be able to: 'esynthesi(e the sine&a)e speech Lab Procedures A. Resynthesizing the Sinewave Speech In this e*ercise$ &e &ill de)elop "P+ analysis for speech and audio class that &as created before. ,se the follo&ing routine to - Main routine: [F,M] = swsmodel(D,R,H) returns four sinusoids$ &ith fre.uencies defined by ro&s of / and magnitudes defined by ro&s of M$ tracking the formants in the speech sample D 0of sampling rate '1. 2ach column of / and M corresponds to 3 samples 0so the analysis frame rate is '431. 5ote: the sound is resampled to 6 k3( &ithin the routine to focus the "P+ on the main formant region$ belo& 7 k3(. Support routine: [,!,"] = lp#$it(D,%,H,&,') fits P%th order "P+ 0all%pole$ autoregressi)e1 models to sound &a)eform D$ using W%point &indo&s ad)anced by 3 samples. 'o&s of contain all%pole filter Sine&a)e Speech nalysis4Synthesis in M!"# 8%8 coefficiets 98 a8 a: .. aP;$ &ith corresponding elements of < gi)ing the frame gain 0residual 'MS1. 2 is the actual e*citation residual. Specifying => as (ero pre)ents o)erlap%add of the residual$ for perfect reconstruction but a less useful 2. Support routine: [F,M] = lp#a($r)() factori(es the "P+ polynomial defined in each ro& of 0as from lpcfit.m1 and returns the sorted positi)e fre.uencies 0up to P4: of them1 in columns of /$ each &ith a corresponding appro*imate magnitude in M. #onus routine: D = lp#synth(,!,",H,'*) resynthesi(es from "P+ parameters returned by lpcfit$ or using noise e*citation if 2 is omitted. /ollo& this these steps to 'esynthesi(e the sine&a)e speech: 8. =pen MATLAB R!"#a. :. In the &orkspce$ please enter the follo&ing script to call the source file 0$pgr"%s&#"'.wav1 and the main routine 0swsmodel1. [d,r] = wa+read(,mp-r1.sx/10.wa+,)1 [F,M] = swsmodel(d,r)1 ?. Sho&s all the fre.uencies in the graph. plot(F,)1 7. "isten the sound resulted. dr = synthtrax(F,M,r)1 so2nd(dr,r) @. +ompare to noise%e*cited reconstruction of "P+ analysis. [a,-] = lp#$it(d)1 dl = lp#synth(a,-)1 so2nd(dl,a)1 A. !he "P+ reconstruction is based on more or less the same information as the sine&a)e replica$ but it sounds less B&eirdB. Please compare the spectrogramsC s23plot(411) spe#-ram(d,(56,r)1 title(,'ri-inal,)1 s23plot(41() spe#-ram(dr,(56,r)1 title(,6ine wa+e repli#a,)1 s23plot(414) spe#-ram(dl,(56,r)1 title(,7oise8ex#ited 9%: re#onstr2#tion,)1 Sine&a)e Speech nalysis4Synthesis in M!"# 8%: D. =bser)e the result. Sine&a)e Speech nalysis4Synthesis in M!"# 8%?