Assignment 5

The assignment is due Sunday, June 27, 11.59 pm EDT. Submission Guidelines

  1. Review: What is 1.5 Watts in dbm? What voltage and power ratio does 23 dB represent? Find out the typical threshold of hearing. What is the dB scale for loudness relative to?
  2. Review question: How do G.711 and G.723.1 differ? What are the advantages and disadvantages of each of these codecs?
  3. Review question: What problems does clock skew cause for audio applications?
  4. Review question: Enumerate the ways that packet loss causes quality impairments for streaming audio.
  5. In class, we saw the formula for deriving the quantization noise ratio for uniform quantization. Motivate the equation. (Approximations are sufficient, i.e., it is sufficient to derive the 6.02N part of the equation.)
  6. Transcoding: Using the toast software, repeatedly compress (encode) and decompress (decode) a sound sample, such a speech recording from the radio or your voice. Listen to the decoded speech and determine when the quality is markedly degraded. Using audacity's waveform display, see if you can identify significant changes, for example, at word boundaries.
  7. Silence detection: This program is in preparation of the next assignment. Using a recorded speech segment, such as the /usr/demo/SOUND/sounds/sample.au file, detect silence and replace it with a zero-sample value. Note that the file is in G.711 (mu-law) format, so you need to convert to 16-bit linear first, using either Audacity or, better, a library.

    The silence value for 16-bit linear audio is zero. However, note that silence in mu-law files is not the binary value 0, but rather 127.

    There will be few or no blocks where all samples are absolute silence, so you will have to perform energy detection on audio blocks to discover blocks that are likely just background noise rather than speech.

    Listen to the sound sample to make sure that it doesn't cut out important parts of the words. Operate on blocks of 20 ms (160 samples) and count the number of blocks declared as silence.

    Your silence detection algorithm should use a dynamic threshold. The algorithm details are left up to you.

  8. Programming problem: We now extend the microphone amplifier application from the previous problem to transmit and receive audio. For this assignment, the sender simply transmits audio packets on the same UDP port as before, and the receiver plays them back as they arrive, without worrying about timing, sequence and packet loss.

    To prepare for future assignments, it is probably easiest if you insert incoming audio packets into a playout ring buffer as they arrive.

    As discussed in class, audio sending (recording) and playback should be synchronized so that every recording interval, one block of audio is delived to the audio output.

    You should now also extend your program to accept command input from the terminal. The first set of commands is

      dest host port
      mute
      unmute
    
    to set the destination for audio and to mute/unmute transmission, respectively. The transceiver application only needs to talk to one destination at a time. In other words, after changing the destination with the dest command, the connection to the old destination is closed.

    The program should still support multicast and IPv6.

    Please see the notes in HW 4 for additional information on audio programming in Java and C.

    The application can be written in C(++) or Java. You may choose either Linux, Solaris or Windows (XP). The programming style guidelines apply. You should omit the Columbia copyright, since assignments belong to the author, not the university.