I was looking for an open source text-to-speech software for a project. espeak isn't that great. Then I found festival: http://www.cstr.ed.ac.uk/projects/festival/
You interact with it through a Scheme interpreter (it's SIOD I think). Here's a tutorial: http://festvox.org/festtut/notes/festtut_toc.html