nvda
nvda copied to clipboard
No longer use `str` in speech sequences
Is your feature request related to a problem? Please describe.
Improving semantics for internal speech processing is held back by maintaining add-on compatibility.
Describe the solution you'd like
- Make
str
and invalid speech sequence item. - All text should be wrapped to give semantics. See
UserInterface
andSymbol
commands in #12710 - A common interface for all text content (but with more semantics than
str
) allows addons to consume this, while giving NVDA core developers flexibility to extend and refine the semantics used.
EG: Once addons all use:
for command in sequence if isinstance(command, TextContent):
command.text = f"Add more info: {command.text}"
We can gradually create subclasses of TextContent
with more specific semantics:
-
Symbol
-
UserInterface
-
Content
-
Context
(https://github.com/nvaccess/nvda/pull/12710#issuecomment-1031277294)
Then we can offer features like UserInterface
uses a different voice from content.
Describe alternatives you've considered
None
Additional context
Very relevant to this is issue #12778 "Split speech processing commands and commands for synth"