Borne out of a growing frustration with the lack of progress on the semester projects, the instructor assigned two one hour programming tasks shown below. This turned into a long ordeal - only 25% of the students finished the assignments within one week... Several students' solutions (correct solutions, of course) to these problems are provided in these directories. -Joe Picone -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Project No. 1: Compute the SNR of a speech file Date: Tue, 13 Feb 96 22:38:35 -0600 From: Joe Picone - The Terminal Man To: ee_8993 Subject: quiz #1 Reply-to: picone@isip.msstate.edu I am tired of seeing so many vacuous faces in class when I throw up equations. Hence, I am forced to resort to quizzes :) By Feb. 22, I would like each of you to produce a program to compute the SNR of a speech file. The program should run from the command line as follows: cat speech_file | my_prog.exe The output should be: the SNR is XX.XX dB The program should do the following: (1) assume 8 kHz data (2) preemphasize using 1 - 0.95 z^-1 (3) use a frame duration of 20.0 msec / window duration of 30.0 msec (4) hamming window the data (5) nominal signal level is the 85%; the nominal noise level is 15% You MUST work alone - no collaborations. If your code even looks similar to someone else's code, your new assignment will be to build a real-time recognizer for ARPA's NAB task (about 100K words)! This is worth some non-negligible percentage of your grade to be determined during your presentation of your project (the angrier I get...) - The "I don't think my students know how to program mathematics" Terminal Man -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Project No. 2: Compute the spectrum of an LPC model Date: Sat, 2 Mar 96 08:22:49 -0600 From: Joe Picone - The Terminal Man To: ee_8993 Subject: Quiz #2 Reply-to: picone@isip.msstate.edu As discussed in class, here is the second short computer problem I would like you to solve: Create a program that functions as follows: cat foo_8kHz.raw | my_prog.exe preemphasis window_duration center_time lp_order | xmgr -source stdin The net result should be a plot of the signal spectrum computed using the following parameters: fs = 8 kHz preemphasis = argv[1] window_duration = argv[2] center time of the window = argv[3] hamming window = yes lp_order = argv[4] and plotted on a log amplitude vs. linear frequency scale. The spectra of the corresponding linear prediction model should be plotted as well. Xmgr accepts multiple sets of data, so simply print your xy points for both plots to stdout, with the second set separated by a newline, and xmgr will take care of the rest. You can use a DFT to compute the spectrum of the signal, or a zero-stuffed fft. The important thing is to only use window_duration number of samples of real data (note that window_duration is specificed in secs). For example, cat foo_8kHz.raw | my_prog.exe 0.95 0.03 3.0 12 | xmgr -source stdin should produce a signal and lp model spectrum for a 30 msec window of the signal centered at 3 secs. The lp analysis will be of order 12. A preemphasis filter 1 - 0.95z**-1 is applied to the data. For most of you, this should be a useful tool to have around. Feel free to pull the LP analysis software off of the net. The main thing is to get the visualization component working - and to understand gain matching of the two spectra. The resulting plots will typically have about a 60 dB dynamic range for studio quality data. This assignment is due March 11 or sooner. Also, please remember to send me your "finished" abstracts. -Joe