Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancellable speech #10885

Merged
merged 4 commits into from
May 8, 2020
Merged

Cancellable speech #10885

merged 4 commits into from
May 8, 2020

Commits on Apr 28, 2020

  1. Cancel speech when focus has expired.

    This experimental feature 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 (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
    feerrenrut committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    43fa90d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1d146f6 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2020

  1. Configuration menu
    Copy the full SHA
    5685b05 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7974c97 View commit details
    Browse the repository at this point in the history