TexttoSpeech callback

18 views
Skip to first unread message

Alan Hendry

unread,
Dec 8, 2021, 12:53:27 PM12/8/21
to DroidScript
HI,
TexttoSpeech has a 4th parameter callback  function()
which I presume should call my function when it has completed
I coded 
    app.TextToSpeech(phrase,,,quiet);
but I got error Unexpected token "," 
So I specified pitch and rate 1.0
    app.TextToSpeech(phrase,1.0,1.0,quiet);
And it seems to work
Volume seems to be controlled by SetVolume "System", 
does stream parameter cause volume to be controlled by "Music"?
Regards, ah

Steve Garman

unread,
Dec 8, 2021, 1:33:25 PM12/8/21
to DroidScript
If you want to skip a parameter but you want to use parameters later in the list
use the word null (no quotes)

You can assume that to be the case for all DroidScript functions
Multiple commas are invalid
Reply all
Reply to author
Forward
0 new messages