article

Amelia@Amazon avatar image
Amelia@Amazon posted

How do I use TextToSpeech?

Summary:

Using the 'TextToSpeech' API allows developers to give their apps a voice of their own. You are able to pass text to the app (such as user generated input), and the app will be able to read this out to the user which is especially useful for the visually impaired, or some sort of app which requires information to be read out.

The API allows you to select from which ever voices are available on the device, and you can also change the volume and pitch of the voice used. Most importantly, you are able to set up an event listener that can detect the status of the speech, so if there was an instance that the API failed, your app could react accordingly by trying again or displaying an alert on the device screen.

Fore more information on the API and the available functionality, see here:

http://developer.android.com/reference/android/speech/tts/TextToSpeech.html

Keywords: Text to Speech, API, Lollipop

KB_0101

androidlollipop
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Article

Contributors

brizzlebrazzle contributed to this article