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:
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.