brailcom / speechd

Common high-level interface to speech synthesis
GNU General Public License v2.0
216 stars 63 forks source link

Screen reader priority? #742

Open sthibaul opened 2 years ago

sthibaul commented 2 years ago

Discussion started on https://mail.gnome.org/archives/orca-list/2022-April/msg00264.html

Is your feature request related to a problem? Please describe.

When two screen readers are running at the same time, e.g. Orca for the whole desktop and brltty for terminals, they may step on each other trying to provide the user with speech rendering.

Describe the solution you'd like

There should be some cooperation so that only one reader speech gets on the sound board.

One way could be to attach another level of priority to a speechd connection, that subdivides the SPDPriority. When a connection sets a higher priority, it prevents messages from lower priorities from being processed (and even cancels any message currently played). This is orthogonal to SPDPriority because for instance in terminals Brltty wants to override the normal output from Orca, but it doesn't have any notion of notification or progress, so it could prefer to let that handled by Orca or a desktop manager.

Describe alternatives you've considered

Orca can be made to completely shut up when switching to a given application, but that's currently a user-specific configuration that only works if brltty is running

shindere commented 2 years ago

Samuel Thibault (2022/04/29 15:59 -0700):

Describe alternatives you've considered

Orca can be made to completely shut up when switching to a given application, but that's currently a user-specific configuration that only works if brltty is running

I am not that familiar with Orca scripting, but I am assuming that the suggested feature oculd be automated through an Orca script.

sthibaul commented 2 years ago

Samuel Thibault (2022/04/29 15:59 -0700): Describe alternatives you've considered Orca can be made to completely shut up when switching to a given application, but that's currently a user-specific configuration that only works if brltty is running I am not that familiar with Orca scripting, but I am assuming that the suggested feature oculd be automated through an Orca script.

But the question is then how Orca could safely detect whether brltty is running or not

shindere commented 2 years ago

Samuel Thibault (2022/05/01 10:42 -0700):

Samuel Thibault (2022/04/29 15:59 -0700): Describe alternatives you've considered Orca can be made to completely shut up when switching to a given application, but that's currently a user-specific configuration that only works if brltty is running I am not that familiar with Orca scripting, but I am assuming that the suggested feature oculd be automated through an Orca script.

But the question is then how Orca could safely detect whether brltty is running or not

Yes, I did realise this was the question. You could even argue that the detected running brlttymay not be the right one, etc. I have no definitive answer, sorry.