Skip to content

Fix missing first SAPI5 utterance after silence#15129

Merged
michaelDCurran merged 1 commit into
nvaccess:masterfrom
LeonarddeR:fixDetours
Jul 11, 2023
Merged

Fix missing first SAPI5 utterance after silence#15129
michaelDCurran merged 1 commit into
nvaccess:masterfrom
LeonarddeR:fixDetours

Conversation

@LeonarddeR

Copy link
Copy Markdown
Collaborator

Link to issue number:

Fixes #15082

Summary of the issue:

The first utterance after around 10 seconds of silence with a SAPI5 synth is not spoken.

Description of user facing changes

Issue does no longer occur.

Description of development approach

Since #14759 we are modifying some window messages in our process. This includes setting the SMTO_ABORTIFHUNG flag. I was able to pinpoint that setting this flag to a message of type WM_APP caused this particular issue with SAPI5. Therefore I excluded this range of messages (WM_APP through 0xBFFF).

Testing strategy:

Tested that NVDA with SAPI5 no longer stays silent when pressing down arrow on the desktop after more than 10 seconds of silence.

Known issues with pull request:

None known.

Change log entries:

None needed.

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • Security precautions taken.

@LeonarddeR LeonarddeR requested a review from a team as a code owner July 11, 2023 19:21

@jcsteh jcsteh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bizarre. I guess Windows thinks the SAPI5 thread is hung even though it's still processing messages? How is that possible? 😕

I can't see any problem with this. At worst, we won't return immediately for messages in the WM_APP range if an app hangs, but they'll still be cancellable by watchdog.

@michaelDCurran michaelDCurran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

@michaelDCurran

Copy link
Copy Markdown
Member

I can confirm this is no longer a problem on my machine.

@michaelDCurran michaelDCurran merged commit f700d56 into nvaccess:master Jul 11, 2023
@nvaccessAuto nvaccessAuto added this to the 2023.2 milestone Jul 11, 2023
@LeonarddeR LeonarddeR deleted the fixDetours branch August 23, 2025 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Losing speech when using SAPI5 if speech has not occurred for some time

4 participants