next up previous
Next: Recording Up: Getting it to work Previous: The ``Home-brew'' Streaming Player

Converting to .WAV

It is easy to convert from .SPX to .WAV. If you want to convert as you download, you can use the following command:

curl -m 7200 http://www.drtak.org/teaches/ARC/cisp317/0821.spx | speexdec - 0821.wav

If you download the file first (let's say it is called 0801.spx), you can use the following command to convert it:

speexdec 0821.spx 0821.wav

Once a .WAV file is created, you can use the media player bundled with Windows to play it. On most systems, you simply have to double-click on the .WAV file to start playing back.

The nice part about using a ``regular'' player to play the .WAV file is that you can repeat, pause, resume and fast-forward.

For those who like a challenge (and understand OS concepts), here's my challenge. In Windows (and Linux, of course), one can create ``named pipes''. A named pipe has a path of \\.\pipe\whatever. The nice thing about a named pipe that is the producer of the pipe can be a program completely different from the consumer of the pipe. In other words, it'd be nice to be able to use a command line like this:

curl -m 7200 http://www.drtak.org/teaches/ARC/cisp317/0821.spx | speexdec - \\.\pipe\0821.wav

This command streams the voice file to convert from .SPX format to .WAV, but the new ``file'' is now a named pipe. If the media player accepts named pipes as filenames, then you can specify \\.\pipe\0821.wav as a file. This way, you get the cool features of your regular media player software while using the highly compressed Speex encoding for over-the-net transmission.

Of course, whether the default Windows media player will take a named pipe as a file is another story.


next up previous
Next: Recording Up: Getting it to work Previous: The ``Home-brew'' Streaming Player
Tak Auyeung 2004-01-30