I am trying to implement text to speech technology of Android in my Activity. It is a simple word game and I want the TTS engine to spell a single letter when the user presses some button. For example when the user presses the A button I want to hear "A".
The problem is the the .speak
method only takes a String as input. So, when I tell the TTS engine that I just want a single letter string, the sound is not the pronunciationof the letter. Is there any way that I can make it pronounce correctly the single letter strings?
The solution so far, was to use as string input, words that sound like the letters, e.g. "bee" for B, "see" for C and so on. But what about F, H and so on?
Any other ideas?
I've updated an old project testing TTS, so yes is the way that you say but putting comma separated to force pronunciation letter by letter, I was trying the other option that you say too (both are included here):
The main class are:
Check the completed code here:
https://github.com/tiveor/android-intermediate/tree/master/SpeechTest
After experimenting a lot, I found a better solution. In order the android tts engine to anounce a single letter you have to write it in capitals. For example "B". This way it will pronounce correctly! The only exceptions are "A" and "Z" which have to be writen as "ay" and "zet"!
Hope this helps