User Tools

Site Tools


built_in:text_to_speech

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
built_in:text_to_speech [2015/03/04 17:21]
octazid created
built_in:text_to_speech [2018/03/12 20:19] (current)
Line 5: Line 5:
 ====Description==== ====Description====
  
-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.+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. Note: Custom speech engines are often installed by phone manufacturers, so the quality, available pitch and speed range may vary between devices.
  
-<code> app.TextToSpeech( text, pitch, speed );</code>+<code> app.TextToSpeech( text, pitch, speed, callback, stream, locale, engine);</code>
  
 ---- ----
Line 19: Line 19:
 function OnStart() function OnStart()
 { {
-  app.TextToSpeech( "DroidScript is awesome!", 1.0, 1.0 );+  app.TextToSpeech( "DroidScript is awesome!", 1.0, 1.0, myfunc, "music" );
  
 +
 +function myfunc()
 +{
 +  alert("Done reading!");
 +}
  
 </code> </code>
  
built_in/text_to_speech.1425489716.txt.gz ยท Last modified: 2015/03/05 01:21 (external edit)