Topics

How can I programmatically change the synthesizer when a user interrupts a voice message?


Oleksandr Gryshchenko
 

Hello all,
Another technical question for developers.
I still want to finally deal with questions related to switching synthesizers in NVDA.

The situation is as follows:
* The voice synthesizer switched to another and reads a long message.
* The user interrupts this long message with the Shift or Control key, or switches to another object.
* At this point, I need to catch the voice interrupt event and call callback, which will restore the previous synthesizer.

I don't understand how we can track this event and handle it.
Does NVDA have any mechanisms that can be used in this situation?

I studied the speech module and found that it contains two logical variables: beenCanceled and isPaused.
So these events are tracked in NVDA.

Please could you tell me how this can be done?

Thank you!
Oleksandr