- (**) EPD by volume and HOD:
(Hint: You should finish part (b) before trying this one since it is trickier debugging an m-file function. When you are debugging your m-file function, be sure to issue "dbstop if error" or "dbstop if warning" to stop at the work space where errors/warnings occur. To clear the debugging flags, try "dbclear all". Also it would be better if you can follow the same flow as in epdByVol.m in the SAP Toolbox.)
- Record your voice of "Singapore is a fine place" and save it as "test.wav", with the format of 16 KHz, 16 bits, mono. (Hint: You can use waveFileRecord.m in the SAP Toolbox for easy recording.)
- Write a script which do EPD by using volume and high-order difference. You should plot your result like this:
(Hint: Be sure to understand all the examples provided in the text before you attemp this exercise. In particular, you should be familiar with the use of "line" command for adding lines to the existing plot.)
- Convert your script to a function epdByVolHod.m with the following usage:
[epInSampleIndex, epInFrameIndex] = epdByVolHod(wave, fs, nbits, epdPrm, plotOpt)
Please test your program using the following script:
- epInFrameIndex: two-element end-points in frame index
- epInSampleIndex: two-element end-points in sample index
- wave: input audio signals within [-1, 1];
- fs: sample rate
- epdPrm: EPD parameter, including three fields:
- epdPrm.frameSize: frame size
- epdPrm.overlap: overlap
- epdPrm.diffOrder: the order of difference (default: 4)
- epdPrm.volWeight: the weighting factor for volume (default: 0.5)
- epdPrm.vhRatio: the constant for obtaining the VH threshold of VHmin+(VHmax-VHmin)*epdPrm.vhRatio (default 0.125)
- plotOpt: 0 for silent operation, 1 for plotting the result (as shown in the previous sub-problem).
waveFile='test.wav'; epdPrm.frameSize = 256; epdPrm.overlap = 0; epdPrm.diffOrder=4; epdPrm.volWeight=0.5; epdPrm.vhRatio = 0.125; plotOpt = 1; out = epdByVolHod(wave, fs, nbits, epdPrm, plotOpt);
- (*) Recordings of digits and letters: This is a recording task for digits and letters. Please refer to this page for details.
- (*) Recordings of voice commands: This is a recording task for voice commands. Please refer to this page for details.
- (***) Programming contest: end-point detection: Please read this page for details.
- (***) Fastest clapper in the world: This guy claims to be the fastest clapper in the world, with 721 claps in a minute, and 14 claps in a second (peak performance):
- Write a program to verify that the peak performance is 14 claps per second, and indicate when it happens using the program. (Please draw the volume curve together with the first 1-sec window that encloses 14 claps, so TA can easily verify the correctness of your program.)
- Record your own clapping and demonstrate your peak performance by using your program.
Audio Signal Processing and Recognition (音訊處理與辨識)