Add isSpeaking function to NVDA controller client#20179
Conversation
|
Closing for now.
|
|
@seanbudd I'm confused. Can you explain how this is a non-trivial change? |
|
By this, I mean it doesn't break or affect anything, since it's just the controller client and creates a new interface. |
|
This is a new feature. For new features, we generally want some justification for why they should exist (e.g. user stories). |
|
@seanbudd Sure, but it's a new feature that my TTS library, Prism, can take advantage of, and would also eliminate screen reader calibration being needed in games and other environments which need to know when the screen reader has finished speaking. |
|
Thanks - can you open a feature request or developer facing changes issue to document the problem, and serve as a place for discussion |
Link to issue number:
N/A
Summary of the issue:
Right now, NVDA provides no way of detecting when it is speaking. This PR attempts to close that gap.
Description of user facing changes:
N/A
Description of developer facing changes:
A new method,
isSpeaking, is added to the speech module. This is a composite check, in that it returns false if either the speech mode is not talk or if speech is paused.Description of development approach:
In the NVDA codebase, "speaking" is a highly ambiguous term. It could mean that the synth driver is actively producing audio or speech is queued but may not be pushed to the synth driver. In this PR, we define "speaking" as the former: NVDA is "speaking" when the synth is actually speaking/producing audio, not when NVDA has speech queued. We do this because this naturally maps to what a user would consider as "speaking" intuitively.
Testing strategy:
This is a difficult property to actively test. Right now, I know that the implementation works over the RPC endpoint at least.
Known issues with pull request:
Code Review Checklist: