Add pre_filter_speechSequence and post_filter_speechSequence extension point Actions#17429
Conversation
…nPoint Actions, inject pre_filter_speechSequence just before filter in speech.speak and use post_filter_speechSequence in speechViewer as @LeonarddeR stated in nvaccess#14520
seanbudd
left a comment
There was a problem hiding this comment.
Closing in favour of #17428
It doesn't seem that this PR adds any new extension points as requested in #14520
filter_speechSequence has already been added.
post_filter_speechSequence has already been added as pre_speech
pre_filter_speechSequence doesn't appear to be required/requested for any use case. Please correct me if I am wrong here
| | ``Action`` | ``pre_filter_speechSequence`` | Notifies before speech sequence filters are processed. | | ||
| | ``Action`` | ``post_filter_speechSequence`` | Notifies after a speech sequence has optionally been filtered by NVDA components and/or add-ons. | | ||
| | ``Filter`` | ``filter_speechSequence`` | Allows components or add-ons to filter a speech sequence before it is passed to the Synth driver. | |
There was a problem hiding this comment.
these should be single backticks, not doubled, please fix the formatting
| |`Filter` |`filter_speechSequence` |Allows components or add-ons to filter speech sequence before it passes to the synth driver.| | ||
| | ``Action`` | ``pre_filter_speechSequence`` | Notifies before speech sequence filters are processed. | | ||
| | ``Action`` | ``post_filter_speechSequence`` | Notifies after a speech sequence has optionally been filtered by NVDA components and/or add-ons. | | ||
| | ``Filter`` | ``filter_speechSequence`` | Allows components or add-ons to filter a speech sequence before it is passed to the Synth driver. | |
There was a problem hiding this comment.
| | ``Filter`` | ``filter_speechSequence`` | Allows components or add-ons to filter a speech sequence before it is passed to the Synth driver. | | |
| | `Filter` | `filter_speechSequence` | Allows components or add-ons to filter a speech sequence before it is passed to the synth driver. | |
| post_filter_speechSequence.notify(sequence=speechSequence) | ||
| pre_speech.notify(speechSequence=speechSequence, symbolLevel=symbolLevel, priority=priority) |
There was a problem hiding this comment.
since these are called at the same point in time, aren't they semantically the same?
I don't think we need post_filter_speechSequence any more, pre_speech is the same concept.
| * Added the [VS Code workspace configuration for NVDA](https://nvaccess.org/nvaccess/vscode-nvda) as a git submodule. (#17003) | ||
| * In the `brailleTables` module, a `getDefaultTableForCurrentLang` function has been added (#17222, @nvdaes) | ||
| * Added the following extension points: | ||
| * ``speech.filter_speechSequence``. (#16191, @beqabeqa473) |
There was a problem hiding this comment.
this has already been added no? this PR doesn't add it.
|
I am sure NVDA remote should get speech before it will be filterred. Because controller side may not know what addons controlled side has, and how speech will be changed. |
|
I don't think so actually. In my view, the speech NVDA Remote receives should be equal to the speech that is spoken at the controlled machine. So if the controlled system filters speech, the controller should speak the filtered speech. |
|
yes, punctuation and autolanguage switching should not be sent to controller side. if we take remote assistancee from sight persons point of view, they can see punctuations, but here we are listening, and our synthesizer may not able to read what controlled side is sending. Personaly i am mostly surviving because of that. |
| def onDestroy(self, evt: wx.Event): | ||
| self._isDestroyed = True | ||
| post_sessionLockStateChanged.unregister(self.onSessionLockStateChange) | ||
| post_filter_speechSequence.unregister(appendSpeechSequence) |
There was a problem hiding this comment.
can you open a new PR that uses pre_speech in speechViewer?
Link to issue number:
Superseeds #16213
Summary of the issue:
Add pre_filter_speechSequence and post_filter_speechSequence extensionPoint Actions, inject pre_filter_speechSequence just before filter in speech.speak and use post_filter_speechSequence in speechViewer as @LeonarddeR stated in #14520
Description of user facing changes
Nothing changed from user's point of view
Description of development approach
Removed code responsible for appending speechSequence to speech_viewer from speech.speak and registered appendSpeechSequence as extensionPoint handler function.
Testing strategy:
Manually tested that speech is still visible on the screen when activating speech_viewer
Known issues with pull request:
None at this moment
Code Review Checklist:
@coderabbitai summary