Add speechSequence filter extension point to speech.speak method#16191
Conversation
|
I have no doubt that this extension point would be useful. Though, could you give one or more concrete use case to illustrate the need of this PR? |
|
It would be mutch easier to modify speech sequence with filter rather than override speech.speak method in addons. |
|
@beqabeqa473, sorry, it's not the answer I was expecting. To ask it in another way: |
|
There are lots of them.
speech history, nvda remote, instant translate, speech logger.
They all are patching speech.speak method to get or modify speech sequence.
…On 2/19/24, Cyrille Bougot ***@***.***> wrote:
@beqabeqa473, sorry, it's not the answer I was expecting.
To ask it in another way:
Have you in mind some specific add-ons which would benefit of this feature?
If yes, please indicate which ones? Thanks.
--
Reply to this email directly or view it on GitHub:
#16191 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
--
with best regards Beqa Gozalishvili
Tell: +995593454005
Email: ***@***.***
Web: https://gozaltech.org
Skype: beqabeqa473
Telegram: https://t.me/gozaltech
facebook: https://facebook.com/gozaltech
twitter: https://twitter.com/beqabeqa473
Instagram: https://instagram.com/beqa.gozalishvili
|
|
And some more: NVDARecord, NVDA Global extension... |
|
There are also add-ons such as openLinkWith, SearchWith, ClipboardEnhancement, etc. that also rely on this feature. |
|
Thanks to all for these examples: @beqabeqa473 you write:
Actually, when they just want to get the speech sequence but not modify them (e.g. Instant Translate, Speech History), an Action extension point would be enough. But I guess it's not needed to implement an Action extension point at the same place as a Filter extension point since a Filter extension point can also be used to trigger an action without modifying the speech sequence. Just mentioning here to check if NV Access agrees with such way to define extension points. |
That's exactly why I suggested this approach earlier. |
LeonarddeR
left a comment
There was a problem hiding this comment.
Please also update the dev guide
I also don't think Action extension point is needed if there will be a filter, where we just can get a sequence and return it as is. |
|
@LeonarddeR Thanks, done. |
|
Thanks @beqabeqa473, this would be most highly useful to numerous add-ons as
you say.
As far as I know, my Speech Logger is the only one of the listed that also patch
as necessary to intercept say-all; that will still need to be separately
patched.
But given how many patch speech.speak, this extension will solve many potential
conflicts and risked conflicts.
|
|
In future please put the word "fixes" before the issue number in the PR description. This ensures the issue is automatically linked to the PR. |
|
please also tick items in the code review checklist. Without these items ticked it is assumed that testing hasn't happened, the PR description is out of date, etc |
…ccess#16191) Fixes nvaccess#14520 Summary of the issue: Added a filterSpeechSequence to speech.speak method to make it possible for addons to filter speech in better way Description of user facing changes None Description of development approach Added filter extension point in speech.extensions and injected it in the beginning of speech.speak
Link to issue number:
Fixes #14520
Summary of the issue:
Added a filterSpeechSequence to speech.speak method to make it possible for addons to filter speech in better way
Description of user facing changes
None
Description of development approach
Added filter extension point in speech.extensions and injected it in the beginning of speech.speak
Testing strategy:
Tested with a plugin and confirmed that it is possible to filter and return filtered speech.
Known issues with pull request:
None at the moment
Code Review Checklist:
Additional notes:
@LeonarddeR I understand, that to make it ideal, some things should be refactored, but can it be considered for potential merging now to eliminate patching speech.speak by numerous addons?