[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Pluseaudio, speech-dispatcher, and console + graphical screen readers



Hi,

sorry, late answer, but this weekend I've installed a new laptop and 
I again needed to configure all the things necesary to have speech 
support in console and graphical environment...., so now I can write all 
things together...

On Mon, Aug 31, 2015 at 05:11:27PM +0200, Mario Lang wrote:
>Christian Schoepplein <chris@schoeppi.net> writes:
>> On Fri, Aug 28, 2015 at 12:33:41AM +0200, Samuel Thibault wrote:
>>>As discussed during DebConf15, we target enabling the accessibility
>>>stack by default.  I've studied that a bit more, here are my thoughts:
>>
>> Diskussing accessibility of Debian should not only be reduced to the 
>> issues you mensioned, Samuel, there are a few more things that need to 
>> be worked out, I think.
>
>> For example the fact, that the way pulseaudio, speech-dispatcher and all 
>> this stuff needs to be configured to work propperly, when orca and a 
>> console screen reader is used.
>
>Of course, there is a ton of issues that need to be worked out.

Sorry, I did not like to hijack the thread and good to know, that the 
other issues are also in mind.

>> I've installed a fresh Debian 8 a few months ago and it wasn't really
>> easy and especialy for beginners this stuff isn't manageable IMHO. Now
>> pulseaudio and speech-dispatcher are running in system mode and
>> everything is working well, but that kind of setup is not wanted for
>> security reasons.
>
>I am tempted to agree with you that we need far too much manual
>configuration interventions for certain accessibility features to
>cooperate, just by my own experience.  However, could you be a little
>bit more specific?  Particularily:
>
> * What sort of setup were you aiming to achieve?

I like to use the graphical environment, in my case Matte Desktop, and 
also a console screenreader with braille support, e.g. brltty or, in my 
case, sbl which can be downloaded on http://www.openblinux.de. the 
problem is the speech support which only is working well in Mate after a 
fresh installation, for the speech support in the console some things 
have to be configured which I will describe later.

> * What was particularily difficult to figure out?

IMHO the problem is that console screenreaders still can be used in user 
mode and have to be executed with root permissions, otherwise they don't 
work. For speech support for the console screenreaders also pulseaudio 
and speech-dispatcher have to be run in system mode. Installing the 
screenreader is not difficult and can be done easily via the package 
manager or by compiling it, but the way pulseaudio and speech-dispatcher 
have to be configured to work with the screenreader was not easy to 
figure out.

> * What did you have to change, from the default, to get what you want?

OK, here is a step by step description the way I did it, but I know 
there are other solutions like Halim allready wrote a few days ago:

1. Change the file /etc/default/speech-dispatcher to use the 
service in system mode:

RUN=yes

2. Change the file /etc/speech-dispatcher/speechd.conf to have the 
following variables set different to the default. I'm not sure, if all 
variables have to be set this way, but for me this settings are fine:

AddModule "espeak"       "sd_espeak"   "espeak.conf"

Because I want the German language to be used by espeak, I changed also 
the following variable accordingly:

LanguageDefaultModule "de"  "espeak"

3. To have pulseaudio running in system mode, insert or change the 
following things in /etc/pulse/daemon.conf:

daemonize = yes
allow-module-loading = no
allow-exit = no
system-instance = yes

4. To enable anonymous authentification to the pulseaudio daemon change 
the following setting in /etc/pulse/system.pa:

load-module module-native-protocol-unix auth-anonymous=1

5. Pulseaudio has to be started when the system is booted, so I put the 
following line in /etc/rc.local to do this automaticaly after the next 
reboot:

/usr/bin/pulseaudio

6. Ofcourse all needed packages, for example espeak and / or brltty or 
another console screenreader have to be installed and configured 
accordingly, to have speech support for console, the speech support for 
the graphical environment has been configured by the Debian installer 
already.

The following steps have to be performed to test the setup without 
booting the machine after all things described above have been done, but 
if you like to reboot speech support hopefully is working now.

Without a reboot do the following:

1. Stop speech-dispatcher and kill all still running processes which 
are not stopped by the start / stop script:

# service speech-dispatcher stop

2. Kill all pulseaudio processes:

# killall pulseaudio

3. Start pulseaudio with the new settings:

# pulseaudio

4. Start speech-dispatcher in system mode:

# service speech-dispatcher start

5. Restart the console screenreader to work with the settings needed for 
speech output, the speech support for the grafic mode still should work.

If no sound output is given, check the mixer settings in the console and 
be sure to turn up the volume and disable muted channels:

# amixer set Master 100% unmute
# amixer set PCM 100% unmute

Thats it..., speech support should work every where and also parallel in 
console and graphic mode and also if virtual machines are used, maybe 
with Windows, sound output is fine.

>> So what about these things? Since pulseaudio is used as default for 
>> sound output, the barriers using Debian with some setups have been 
>> increased...
>
>I agree, pulseaudio has been a source of many bugs in the user
>experience.
>I myself remember several incidents where ALSA soft mixing (which is,
>AFAIU, supposed to be the default) failing and pulseaudio effectively
>preventing a console ALSA application from gaining access to the sound
>card.  I admit that I was not investigative enough in this situations,
>and mostly just ended up "apt-get remove"'ing pulseaudio.  I know this
>is no solution, and I am guilty of just giving up on that front in the past.

Hehe, it was also my prefered solution in the past, but better we should 
work things out and try to get a good and working setup with the tools 
and software we have to use now. I think in most cases it is just a 
matter of having the right settings and finding a way to do it the 
easiest way. I know that my way to have a working setup is no good 
solution when having security and those things in mind, but on the ohter 
hand I'm the only person working with the machine I configured 
pulseaudio and speech-dispatcher in the way everyone tells me not to do 
it :-). I think in most cases machines with enabled speech support for 
console and graphic mode are used only by one person at the same time, 
so issues regarding security should be not that important, allthough 
find out the best and savest setup should be the goal :-).

>We need a pulseaudio expert to chime in on this.  Or someone from our
>group needs to become one.

Full ACK :-). Is there anyone in the Debian team we could contact or 
what do you think is the best waay to get mor support regarding our 
pulseaudio issues?


>From POV of the Accessibility Team, our goals are easily summarized:
>
> * Configure whatever audio system is in use automatically, loading
>   necessary modules, starting user-space support and ensuring the primary audio
>   output channel levels are up, *not* muted.  This needs to happen
>   independent from the desktop in use, and should also work if no graphical
>   environment has been started at all.

Full ACK again, but there is one big problem... If only the graphical 
environment is used, things can run in user space without  problems. But 
if a console screenreader is used, no matter with speech support or not, 
this screen reader has to be run with root permissions. If speech 
support for console is wanted, all this user space stuff is still more 
problematic and the communication between the several services running 
in different user modes are even more complex. So my idea or 
aproach would be to find out the best and securest setup to have 
parallel speech and braille support enabled for both environments, even 
if it is not recommended. As already mensioned, in most cases the 
machines used by blind people are used by only one person, so maybe the 
security issues are not that problematic...., but this can be discussed 
with people from pulseaudio or speech-dispatcher...

The people how need a screenreader and like to use Debian like to work 
with the system, they don't want a non useable system because of 
security issues..., that should be the first to have in mind I think.

Also we should try to find out solutions for the things that cause the 
difficulties we have with console screenreaders, console speech support, 
pulseaudio, speech-dispatcher and all the user space stuff at the 
moment. If for example all things should run in user space mode in 
future and running screenreaders in root mode is not wanted anymore, 
also the console screenreader, there have to be solutions to configure 
and use the screenreader this way or there have to be other 
possibilities to give all the screenreading software the information it 
is needing to work.

In conclution the problemis that more and more services are running in 
user space mode, which is good and wanted ofcourse, but on the other 
hand screenreaders need to run as root to get the informations they need 
to work..., at least every console screenreader I know. And as long the 
grafical environment is working as it is at the moment, I don't like to 
miss console support on linux systems, still many things are done more 
easily and much faster in an textbased environment as with a graphical 
desktop...

>We need to identify common use cases which currently have problems in
>any of these areas.  If you know of any, speak up.

I hope I have done it with this mail :-). I want console braille and 
speech support and also want to use a graphical desktop, if it is 
necesary, and for that reason I've configured my system the way 
described above. I know the problems that that kind of setup is causing, 
especialy fromthe point of view of security, but I see no other way to 
do it another way at the moment and as long more and more things are 
done in user space, but console screenreading and sound output for this 
screenreaders still need to work with root permissions.

If anyone has better ideas how to setup a system with the needs I have, 
and I think most of all other blind and regular Linux users have 
those similar needs too and don't like to pass up one of both worlds 
(console or graphic mode), please tell how todo it :-).

cheers,

  Christian


-- 
Christian Schoepplein - <chris (at) schoeppi.net> - http://schoeppi.net

Attachment: signature.asc
Description: PGP signature


Reply to: