Javatpoint Logo
Javatpoint Logo

Android TextToSpeech Example

TextToSpeech class is responsible to convert text into speech. It provides a lot of methods to control the speech such as setSpeedRate(), setPitch() etc.

In this example, we are going to see the android texttospeech example with speed and pitch option.


Drag 2 textviews, 1 edittext, 1 spinner and 1 button for the layout. Now the activity_main.xml file will look like this:

File: activity_main.xml

Activity class

Let's see the code to speak the given text.


You need to run it on the Real Device (e.g. Mobile) to test the application.

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA