-
-
Notifications
You must be signed in to change notification settings - Fork 634
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to cancel speech for expired focus events (PR #10885)
This experimental feature (disabled by default) can be controlled with a flag in the advanced settings panel. In eventHandler.py keep track of objects that have had focus (on the object, using attribute 'wasGainFocusObj'). This expands on the 'lastQueuedFocusObject' concept. A cancellable speech command is added to speech sequences that result from the focus change event. This command is able to check if the object once had focus ('wasGainFocusObj') and if it still has focus. Speech for objects that no longer have focus can be discarded, or cancelled if already with the synth. Then checking for cancellations is done both early in the speech pipeline (eventHandler) and late (speech.manager.speak) This requires some careful tracking and processing in speech manager. When nothing is with the synth, try pushing more. Otherwise, there are items in the queue but nothing being spoken. When cancelling synth clear tracking of "with synth" Use _removeCompletedFromQueue rather than _handleIndex _handleIndex may not actually call _removeCompleted. Cancelled speech does need it's callbacks called. For now CancellableSpeechCommand should be considered a private API Updates Changes file for PR #10885
- Loading branch information
1 parent
1cf36fb
commit 9967903
Showing
9 changed files
with
330 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.