Modifying the dial-by-name app to use speech synth

I’ve finally really gotten Asterisk all set up the way I want it to be. It’s cool. VM works, dial-by-name, everything.

Now, of course I want to do more with it. One small but cool thing I would like to do is to use Festival to do speech synth in the dial-by-name directory. Instead of having it spell out the guy’s name, I would like it to read the name.

I’m sure Asterisk can do this. Can anyone point me in the right direction? Getting it to interface to Festival is pretty easy, but how about plugging that in to the Directory() app?