PA2Z Final: Why I Ate My Wife/DIY Text to Speech
Online version here (right click and hit "Play").
Java code here.
.fla file here.
Currently I only have one of the additions to my midterm project working: my homemade text to speech translator using my own voice. It was fairly straighforward to build and program. Here's how I did it:
1) Obtain a list of every possible phoneme from the Rita getPhonemes() method.
2) Recorded myself saying every one of said phonemes and converting them to mp3s.
3) Do getPhonemes() on a piece of text
4) Read the array given by getPhonemes() into Flash
5) Each phoneme of a word is separated by a dash. Split each word into an array divided by these dashes.
6) Create a function which plays one mp3 at a time, pausing for the duration of the mp3 before moving to the next one.
In this example I used text from Michael Gira's "Why I Ate My Wife". My original idea was to use text from my dreams, but I haven't remembered more than five seconds of any dreams I've had since I presented my final idea 3 weeks ago.
What doesn't work (yet):
I wrote a method which gets all the holoynyms of each word (using getHolonym()), then "crawls" all of those words and looks for their holonyms. This piece of text has a strong focus on the body so I looked for words which would return the word "body" or similar words. From there it would use the Flickr API to find images tagged with that word, then displays them in some form when the word they're related to appears on screen in the Flash movie.
Sadly the methods of RitaWN are giving me a lot of trouble even in very straighforward situations and I get an error about which I've found absolutely no useful documentation online.
For some reason, I could not get many functions in RitaWN to work, even simple ones in simple circumstances, so that and the Flickr API will have to wait.