I have no experience yet in sound on java....
Here is my idea...
You have to put a database of sound file that was saved in word... or english word....
First, you have to record your voice for some words you like....
for example, you've recorded the words "I", "am", "a" , "java", "programmer"......
the recorded " I " "am" soundfile and so on must also be saved in ( for example, you've saved them in wav format ) I.wav , am.wav and so on..
in every text, I assume that those text are valid english words...
So, when i have a text that has string values " i am a java programmer ", you may have a loop using StringTokenizer... and compare them
with you sound database.... if one of the filename is equal to the word you've compare, play that sound....
After that implementation, there are times that the timing of compare will be at worst....
So you have to put them on a new Runnable... ( Create a new thread ), so that you could adjust the play timing of the sound in every word
comparison....
thread.sleep(value);
Hope it helps,
sukatoa