This is a problem that has been bugging me for some time, and today I found my solution. Huzzah!
For my work I do a bunch of stuff with the phone network, and the standard that it uses for audio is CCIT μ-law, as described here. Basically this uses an 8khz bit rate, mono PCM (.wav) file. Not quite CD quality, but if you've ever spoken to anyone on the phone, you know that.
Now .wav files aren't really very useful for streaming over the internet, especially as flash doesn't have a great time handling them, especially this weird old-world format optimised for hardware routing. Seems Flash really wants mp3. Which is fair enough, I'm not gonna send a change request to Adobe - it may be that they'll put support in for Pacifica anyway
So, while spending a Sunday afternoon trying to get a demo ready for BlogTalk 2008 (it's last minute, it starts tomorrow!) this is an itch I very much needed to scratch, and preferably using open source tools, and definitely from a command line (which in turn, gets called from ASP.Net using System.Diagnostics.Process.Start)
The tools you'll need are SOX and LAME - you'll need an executable version of LAME, rather than a dll. If you're trying this on an operating system other than Windows this technique might not work in exactly the same way, but the tools are cross platform, so you should find a way.
But both sox.exe and lame.exe in the same folder. Then run this command line (thanks to this old O'Reilly post for pointing the way)
sox -t wav yourinputfile.wav -t wav -s -w -c 1 -r 8000 - rate | lame -b 80 - youroutputfile.mp3
Obviously you'll be changing filenames as you see fit, but the output should be just fine.
Apparently the "rate" switch is deprecated in the version of sox I've got hold of, but frankly, I don't care. This has given me the result I wanted, which is a low quality mp3 file from a CCIT μ-law message that's been left in a kinda voicemail system using the "record" function in CallFlow
Hope this is useful to someone out there! If you feel really brave sox can possibly do this in realtime (ie audio in, audio out, without hitting the file system!) If someone knows how this is done, I'd love them to share.
Now all I need to do is dump the MP3's in an RSS feed. But that should be the easy bit.