Skip to content

UIA backend: interrupt and stop cannot cancel queued speech (NotificationProcessing_ImportantAll) #71

Closed

Description

@Orinks

Summary

The UIA backend raises every notification with NotificationProcessing_ImportantAll, which Narrator treats as append-only: nothing already queued is ever cancelled. As a result, speak(text, interrupt=true) does not interrupt, and stop() is also a no-op (it raises an empty notification, again with the append-only processing flag, so it just adds a silent entry to the queue).

For menu-driven applications this makes the UIA route unusable: arrowing through a menu queues every item in full, and the user hears an ever-growing backlog instead of the currently focused item.

Source references (pinned to 0b947b4)

Interrupt maps to ImportantAll — source/backends/uia.cpp#L156-L157:

const auto processing = interrupt ? NotificationProcessing_ImportantAll
                                  : NotificationProcessing_All;

StopCommand raises an empty notification with interrupt=true, i.e. also ImportantAll — source/backends/uia.cpp#L206-L208:

[prov](const StopCommand &) {
  prov->RaiseNotification(_T(""), true);
}

Per the NotificationProcessing docs, ImportantAll means "add to the queue, do not interrupt", while ImportantMostRecent cancels the current utterance and flushes pending notifications from the same provider.

Observed behavior

Windows 11, Narrator running, Freight Fate (an audio game) routing speech through the UIA backend: every speak(..., interrupt=true) while browsing menus queues instead of cutting off the previous item; stop() has no audible effect.

Suggested fix

const auto processing = interrupt ? NotificationProcessing_ImportantMostRecent
                                  : NotificationProcessing_All;

and the same flag for the StopCommand path so it actually flushes the queue. Happy to test a build against Narrator — this is the one backend change blocking us from preferring the UIA route while Narrator is the user's active screen reader.

Activity

  1. ethindp commented on Jul 6, 2026

    @ethindp
    Owner

    @Orinks Please test commit bd17ba0. If that does not resolve your issue then I will reopen this.

  2. added a commit that references this issue on Jul 12, 2026
    bd17ba0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions