So I thought I'd see why everyone talked about flite, but didn't use it. The download page for flite even has a linux ARM binary!

The first thing I noticed was that it wanted a newer version of libc. My empeg has 2.1.2 (I'm running 2.0b11) and flite wants 2.1.3. So I grabbed the libc6 package from debian Potato (also pre-compiled for ARM). I did kinda get myself in trouble here... I wasn't thinking about it when I went to swap in the new libc. I rm'd the link to the old one and tried to put a link pointing to the new one. Well, the ln command doesn't work when neither of them is there (duh). Luckily, I was able to use kftpd to put the new one in place (since it's in the kernel and not trying to load libc every time I type something).

Anyway, with flite and libc 2.1.3, I gave it a try. Well, it can't output audio directly on the empeg, but it can create a .wav file. So I created a simple text file and had flite read the text into a .wav. Then I used pcmplay to play the wav. Since flite created a 8KHz mono sample and pcmplay assumes 44KHz stereo, it just sounds like a high-pitched beep.

Rather than do a proper re-sampling, I wrote a quick hack to just read 2 bytes (16 bit samples) and write those same 2 bytes back 11 times. The result actually sounds decent.

The next challenge was to make it so you don't have to run 3 commands everytime you want it to say something. To do this, I created a fifo and added to my sample duplicator prog to sit in a loop reading from the fifo. I have a wrapper shell script around this that pipes the output to pcmplay too. Then I called the shell script from preinit.

The end result? I can read any text file on the system with a single command.

It still needs a bit of work smothing things out though. Installation is a bit tedious and I don't have a readme, but I'll see if I can put some sort of package together with some basic instructions tonight.

I'm a little nervous that the libc2.1.3 (from debian) is only 900K whereas the 2.1.2 (empeg 2.0b11) is 950K. Maybe my player won't boot next time I shutdown.... I'll make sure to test this before giving out instructions
_________________________
--The Amigo