The Speex codec uses an open-source compression method that is optimized for voice (speech) compression. I became interested in it when I started downloading and transcoding radio shows from the internet.
Ideally, I would like to make a Sharp media player plug-in, which has been demonstrated to be possible (there is a plug-in for Ogg-Vorbis audio). This is beyond my time and abilities at the moment.
I did manage to compile the basic Speex utilities, speexenc and speexdec, for the Zaurus. I believe they use floating point emulation on the ARM processor, but the quick tests I did of minute-long clips were actually fairly quick to encode and decode. I imagine the only real use for this encoder on the Zaurus would be if you did a lot of voice recording and wanted to compress it. Decompressing entire radio shows to wav files would of course be a waste on the Zaurus, but perhaps one could pipe them to sox or something.
The Speex utilities use the Ogg container format, and libogg is necessary. Not needing libogg for anything else with my Sharp ROM, I compiled it and and linked it statically into the utilities. I do believe ROMs other than Sharp may have libogg for their media players, so static linking may not be what everyone wants. But the cost of statically linking the necessary members of libogg is only about 8kB per executable. I also statically linked libspeex routines, because libspeex.so is 50% larger than the two statically linked utilities combined. I give the compilation instructions below, in case someone wants to duplicate the process and enable shared libs.
Here's the config line for libogg I used on my development machine (with environment configured to use arm-linux tools). I installed it into a temporary location using the DESTDIR variable just to link it and then wiped it.
tar zxvf libogg-1.1.tar.gz
cd libogg-1.1
./configure --host=arm-linux --prefix=/usr/local --disable-shared
mkdir /tmp/pkg-ogg
make && make install DESTDIR=/tmp/pkg-ogg
Here's the config line for speex utilities.
tar zxvf speex-1.1.4.tar.gz
cd speex-1.1.4
./configure --host=arm-linux --prefix=/usr/local \
--enable-arm-asm --disable-shared \
--with-ogg-dir=/tmp/pkg-ogg/usr/local/ \
--with-ogg-includes=/tmp/pkg-ogg/usr/local/include/ \
--with-ogg-libraries=/tmp/pkg-ogg/usr/local/lib/
make
arm-linux-strip src/speexenc src/speexdec
Here's the package. I put the utilities in /usr/local/bin for my personal preference, but I realize this will preclude anyone from installing the package to CF or SD cards. But with only two files, it should be trivial for you to move them after installation.
Package name: speex-tools
Package file: speex-tools_1.1.4_arm.ipk
Installed size: 213,576 bytes
File list:
/usr/
/usr/local/
/usr/local/bin/
/usr/local/bin/speexdec
/usr/local/bin/speexenc
The man pages may be useful, although there is a help message if you run the tools with no arguments.
speexenc (1) - Ogg-Speex voice compression encoder
speexdec (1) - Ogg-Speex voice decompression codec
Finally, if anyone wants to develop a media player plug-in for speex, by all means, please do! It would be much appreciated.