Multimedia Networking Project 2

Speak - A Simple VoIP Application

Due date: March 16th

by 6:00pm

Index


Overview

An audioconference, or Voice over IP (VoIP) application, allows people to talk to each other from computers connected across a network. Although networked computers have been able to do audio well for over 10 years, the explosive growth of the Web has fueled interest in the Internet and in it, interest in Internet telephony.

For this project, you are to write a basic two-person VoIP application named Speak and explore how some basic system parameters effect the quality of the audio stream. Speak will incorporate speech detection, directly from your project 1, to avoid sending unnecessary silent packets onto the network.

Speak can have a minimal user interface, but needs to support some command line parameters (or basic menu interface) to allow varying of system parameters. You are free to add any additional features, as you see fit.


Details

Speak can run on pretty much an OS, Windows, Mac or Linux. You will have to get it working on two machines, actually.

Speak will use standard Internet sockets to make connections between the audioconference processes. From any Internet host, a user running Speak should be able to connect to another user running Speak from any other Internet host, so you need a way to specify the hosts at run-time. You may wish to make the port numbers to which they connect dynamic, too, but that is optional.

Speak needs to support both TCP and UDP sockets. You can have a default connection type, but there should be a way the user can specify the socket type when Speak starts.

Speak should support a variety of samples intervals. Typical audioconferences sample the audio device every 20, 40 or 60 ms in order to keep latency low. You may choose one of these for the default, but must then provide a means to specify alternate sample sizes (up to a second) when Speak starts. Running Speak at larger sample intervals will give you some insight in how latency makes interactive communication difficult. (You will test this in project 2b).

Speak can enable basic speech detection if indicated at run-time. Since the size of your speech chunks will likely be much smaller than the sample interval you used in project 1, searching backward (or forward) for a zero-level crossing rate for 250ms is not practical. Thus, you can detect speech based on energy levels only. You can tune your speech detection threshold to work well in your environment. See computeEnergy.c and getThresh.c for one such example.

In order to evaluate how Internet packet loss affects audio, Speak must be able to randomly drop packets it receives. Loss should be done on a packet level and at various rates when Speak starts. (You will test this in project 2b.)


Hints

There are many different architectural solutions you can have for your Speak.

Windows Implementation

This sub-section has some Windows-specific hints.

Here is some sample code showing system calls that you may find helpful. Some must be used while others may be used depending upon your implementation:

Linux Implementation

This sub-section has some Linux-specific hints.

Here is some sample code showing system calls that you may find helpful. Some must be used while others may be used depending upon your implementation:

All of the above sample calls work in Linux but may work in other environments, especially Unix environments, as well.

Use the man command to find out additional information on the system calls used.


Hand In

You must turn in:

Tar up (with gzip or winzip) your files, for example:

    mkdir proj2
    cp * proj2  /* copy all your files to submit to proj2 directory */
    tar czvf proj2.tgz proj2

then attach proj2.tgz to an email with "cs529_proj2" as the subject.


Return to the Multimedia Networking Home Page

Send all questions to the Mark Claypool.