Page 1 of 1

how to stop speechSpeakUtterance handler

Posted: Mon Jun 19, 2023 6:02 pm
by joseggarza
Does anyone know how to stop the speechSpeakUtterance handler process?

When I send a fairly long paragraph, I would like to be able to end it at any desired moment and not have to wait until it finishes speaking it in its entirety.

JG

Re: how to stop speechSpeakUtterance handler

Posted: Mon Jun 19, 2023 6:26 pm
by Emily-Elizabeth
From the dictionary
Use the revStopSpeech command to let the user interrupt a lengthy speech, or to stop a speech before it's finished.

You can use the revIsSpeaking function to determine whether there's currently a speech in progress.

Re: how to stop speechSpeakUtterance handler

Posted: Mon Jun 19, 2023 7:18 pm
by SparkOut
I think that is different to the new (since v 9.6) library for Mac OS, iOS and Android.

A snippet I found from jacque shows you should be able to do this by

Code: Select all

speechSpeakUtterance(empty)

Re: how to stop speechSpeakUtterance handler

Posted: Mon Jun 19, 2023 8:42 pm
by joseggarza
SparkOut wrote:
Mon Jun 19, 2023 7:18 pm
I think that is different to the new (since v 9.6) library for Mac OS, iOS and Android.

A snippet I found from jacque shows you should be able to do this by

Code: Select all

speechSpeakUtterance(empty)
I already tried that, but it did not work, it adds to a queue to speak instead..

JG

Re: how to stop speechSpeakUtterance handler

Posted: Mon Jun 19, 2023 9:15 pm
by joseggarza
I found one solution. I dont know if that is the best solution, but it works. I had to Finalize the library and initialize it again.

Code: Select all

on mouseUp pButtonNumber
    speechFinalizeLibrary
    speechInitializeLibrary
end mouseUp