Hassan Mokdad
Hassan Mokdad

Reputation: 5902

Built in Text To Speech in Android

Are there any built in Text To Speech Libraries in Android? and if not do you know any external libraries to use?

Upvotes: 0

Views: 232

Answers (1)

Ricky
Ricky

Reputation: 7899

Have a look at this Android TTS API.

Here's an example of using it:

t1=new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {
        @Override
        public void onInit(int status) {
            if(status != TextToSpeech.ERROR) {
                t1.setLanguage(Locale.UK);
            }
        }
    });

t1.speak("This will be spoken.", TextToSpeech.QUEUE_FLUSH, null);

Upvotes: 1

Related Questions