Skip to content

No longer use str in speech sequences #12779

@feerrenrut

Description

@feerrenrut

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 and Symbol commands in Speak Symbols When moving by word #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:

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-breaking-changecomponent/speechmerge-earlyMerge Early in a developer cyclep4https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#prioritytriagedHas been triaged, issue is waiting for implementation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions