Using Text-to-Speech


  • Text-to-Speech

Starting with Android 1.6 (API Level 4), the Android platform includes a new Text-to-Speech (TTS) capability. Also known as "speech synthesis", TTS enables your Android device to "speak" text of different languages.

This example is included with the Py4A installation

import android droid = android.Android() message = droid.dialogGetInput('TTS', 'What would you like to say?').result droid.ttsSpeak(message)

Code Explained

The user's text is spoken