Skip to content

Fix for SAPI5 synthesizers missing some messages#11586

Merged
feerrenrut merged 5 commits into
nvaccess:betafrom
dawidpieper:Fix_SAPI5_Missing_Messages
Sep 22, 2020
Merged

Fix for SAPI5 synthesizers missing some messages#11586
feerrenrut merged 5 commits into
nvaccess:betafrom
dawidpieper:Fix_SAPI5_Missing_Messages

Conversation

@dawidpieper

@dawidpieper dawidpieper commented Sep 10, 2020

Copy link
Copy Markdown
Contributor

Issue:

Fixes #10901.

Summary of the issue:

In NVDA 2019.3, some indexes are not processed by SAPI5 synthesizers. As a result, for example, when expanding Windows tray or navigating using letters (with characters echo enabled), some information is lost: here icon names.

Description of how this pull request fixes the issue:

As a workaround, we add a 1msec delay after all messages sent to synthesizers, similarly to the workaround for SAPI4 (#10792).

Testing performed:

All tests passed, problem seems to be fixed.

Steps to reproduce:

  1. Install demo version of any of the ivona voices from the www.harposoftware.com
  2. Keep turned speaking of the individual characters nvda+2
  3. On the desktop, press individual letter on which the name of any icon starts. It will speak just the individual letter you pressed, but not the named icons.

We cannot expect fix from the synth manufacturer, as Ivona is now part of Amazon, and harposoftware just sell these

Known issues with pull request:

None yet.

Change log entry:

Bug fixes
SAPI5 voices should no longer miss some information

@zstanecic

zstanecic commented Sep 10, 2020 via email

Copy link
Copy Markdown
Contributor

@feerrenrut

Copy link
Copy Markdown
Contributor

@dawidpieper Is there an issue you can reference for this? It would be helpful to have steps to reproduce.

@feerrenrut

Copy link
Copy Markdown
Contributor

This could potentially be included in the beta, it would need to be rebased first though.

@zstanecic

zstanecic commented Sep 10, 2020 via email

Copy link
Copy Markdown
Contributor

@zstanecic

zstanecic commented Sep 10, 2020 via email

Copy link
Copy Markdown
Contributor

@LeonarddeR

Copy link
Copy Markdown
Collaborator

@dawidpieper Could you rebase this onto beta or do you need any assistance?

@dawidpieper dawidpieper force-pushed the Fix_SAPI5_Missing_Messages branch from a4e29ab to c07a2e9 Compare September 13, 2020 15:11
@dawidpieper dawidpieper changed the base branch from master to beta September 13, 2020 15:16
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 260f8e509a

@dawidpieper dawidpieper force-pushed the Fix_SAPI5_Missing_Messages branch from 422786e to a3a16a3 Compare September 13, 2020 15:30
@dawidpieper

Copy link
Copy Markdown
Contributor Author

Sorry for the confusion, I hope it is okay now.

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit c7cd8c2a48

@dawidpieper

Copy link
Copy Markdown
Contributor Author

I can see now that this issue is already mentioned as #10901

@feerrenrut

Copy link
Copy Markdown
Contributor

After discussing this a little, we'd like to investigate why indexes are sent to the synth without content which seems like the the real cause of the bug. The first step to investigating this would be to add a unit test for speech manager that replicates the behavior. There are lots of other tests for speech manager, see tests/unit/test_speechManager/__init__.py

@zstanecic

zstanecic commented Sep 15, 2020 via email

Copy link
Copy Markdown
Contributor

@dawidpieper

dawidpieper commented Sep 15, 2020

Copy link
Copy Markdown
Contributor Author

Some synthesizers just complete speech sequence after last command, ignoring last indexes. It does not seem to be NVDA issue. You can test it with simple xml:

<Bookmark Mark="test_1" />
This is a first phrase.
<Bookmark Mark="test_2" />
And this is a second one.
<Bookmark Mark="test_3" />
And this is the last one.
<Bookmark Mark="test_4" />

You get test_1, test_2 and test_3 bookmarks, but some synthesizers will never report test_4.

Tested it also with this example VB code:
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ee125622(v=vs.85)

@feerrenrut

Copy link
Copy Markdown
Contributor

That is helpful to know, and might be documented better in NVDA.

We also have synthDoneSpeaking which tells us when the final speech is finished. If we can resolve the concerns in this way, then bookmarks / speech indexes can be thought of as belonging "Before some speech" rather than after. IE they notify speech is about to start, rather than some speech just finished.

@dawidpieper

dawidpieper commented Sep 16, 2020

Copy link
Copy Markdown
Contributor Author

And we can also queue the messages instead of waiting for them with bookmarks, I think.
Nevertheless, I think it would be justified to introduce this bug fix as a temporary workaround - this problem is often reported on polish forums, where Ivona synthesizers are very popular.
I can also document it better, but I don't know, where.

@feerrenrut feerrenrut 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.

@dawidpieper Thanks, we'll merge this for now. We plan to replace this approach in 2020.4 with #11651

@feerrenrut feerrenrut merged commit de18dc1 into nvaccess:beta Sep 22, 2020
@nvaccessAuto nvaccessAuto added this to the 2020.4 milestone Sep 22, 2020
@feerrenrut feerrenrut modified the milestones: 2020.4, 2020.3 Sep 22, 2020
@btman16

btman16 commented Sep 24, 2020

Copy link
Copy Markdown

Hi,

The issue is not fixed for the LH TTS voices that is described in issue 10901.

I'm still experiencing the same behavior as before this recent change.

Thanks,

Brandon

@feerrenrut

Copy link
Copy Markdown
Contributor

While this this seems to fix Ivona synth, this introduces regressions for other synthesizers. I'm going to revert this from the beta, there is already a more robust fix delivered to master see "Speech manager no longer sends synths utterances containing only param change and index commands." #11651

Further fixes should target 2020.4

feerrenrut added a commit that referenced this pull request Sep 29, 2020
@feerrenrut feerrenrut mentioned this pull request Sep 29, 2020
feerrenrut added a commit that referenced this pull request Sep 29, 2020
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.

7 participants