how to stop speechSpeakUtterance handler

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
joseggarza
Posts: 44
Joined: Thu Jul 24, 2014 8:55 pm

how to stop speechSpeakUtterance handler

Post by joseggarza » Mon Jun 19, 2023 6:02 pm

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

Emily-Elizabeth
Posts: 101
Joined: Mon Jan 03, 2022 7:10 pm

Re: how to stop speechSpeakUtterance handler

Post by Emily-Elizabeth » Mon Jun 19, 2023 6:26 pm

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.

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: how to stop speechSpeakUtterance handler

Post by SparkOut » 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)

joseggarza
Posts: 44
Joined: Thu Jul 24, 2014 8:55 pm

Re: how to stop speechSpeakUtterance handler

Post by joseggarza » Mon Jun 19, 2023 8:42 pm

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

joseggarza
Posts: 44
Joined: Thu Jul 24, 2014 8:55 pm

Re: how to stop speechSpeakUtterance handler

Post by joseggarza » Mon Jun 19, 2023 9:15 pm

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

Post Reply

Return to “Android Deployment”