This is not an intention, but for this purpose you can use the TextToSpeech class for Android. Essentially, just create an instance of TextToSpeech , and then call the speak method with the string you want it to say.
There are some initialization overheads associated with the TTS engine, so you should try to do this sooner; You may experience a delay if you try to initialize the engine the moment you want it to speak.
The CompassService class in the Compass GDK example shows this in more detail.
source share