This would be better executed with something like Flash or Java, as with PHP you're most likely going to have to shell out to a speech program, generate an MP3, then load the MP3 into the page. There are, however, a number of text-to-speech programs for Linux that are command-line based and scriptable, so if you do want to pursue the PHP route, it would be possible, but it's most likely not the best solution.