Back

TextToSpeech

The TextToSpeech method uses Android's speech engine to speek out loud the given text. You can specify the pitch and speed of the output with decimal values where a value of 1.0 is used for normal pitch or speed.

Note: Custom speech engines are often installed by phone manufacturers, so the quality, available pitch and speed range may vary between devices.

 app.TextToSpeech( text, pitch, speed );

Example

function OnStart()
{
  app.TextToSpeech( "DroidScript is awesome!", 1.0, 1.0 );
}
  Copy   Copy All    Run