Fix language override persisting after leaving multilingual content#100
Open
akj wants to merge 2 commits intofastfinge:masterfrom
Open
Fix language override persisting after leaving multilingual content#100akj wants to merge 2 commits intofastfinge:masterfrom
akj wants to merge 2 commits intofastfinge:masterfrom
Conversation
Collaborator
Author
|
@amenaide does this updated pr fix your remaining issues? |
…astfinge#97) When automatic language switching activates (e.g. on an English website with NVDA set to German), the voice change leaked into subsequent speech sequences that contained no LangChangeCommand. Reset the voice to the user's default at the start of each speak() call when a language override is active.
…nge#97 cases The initial fix reset the voice at the start of each speak() call, but NVDA's SpeechManager carries the document language into subsequent speech sequences (menus, desktop, role names), immediately overriding the reset. Use cancel() as a context-switch signal: when speech is cancelled while a language override is active, record the overridden voice and suppress the first LangChangeCommand in the next speak() that re-applies it. This handles UI speech (desktop, Alt menus, NVDA menu, role names) without breaking continuous foreign-language reading in sayAll mode, where cancel() is not called between speak() invocations.
b3176a5 to
0857d27
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #97
Summary
speak()calls that contained noLangChangeCommand— such as pressing Win+M to go to the desktop.speak()call, if a language override is active, reset the voice back to_defaultVoice. This mirrors the existing prosody reset pattern (issue Rate state leak in ETI-Eloquence 64-bit when using NVDA RateCommand (possible driver-level handling issue) #59). If the new speech sequence contains its ownLangChangeCommand, it will override this reset as expected.Test plan