[raspberry-vi] Progress

  • From: Mike Ray <mike@xxxxxxxxxxxxxxx>
  • To: raspberry-vi@xxxxxxxxxxxxx
  • Date: Wed, 09 Apr 2014 02:41:58 +0100

Hello list.

You're all very quiet.

I thought it was time to let you know how things are going here with 
efforts to get stuff going.  So in order of significance, from high to low:

I finally have speech-dispatcher running on both Raspbian and Arch Linux.

I have taken a long time over this for three very good reasons:

1.  Using the espeak synthesizer with the 'espeakup' program to connect 
speakup to espeak has proven to be unusable on the Pi.

Despite trying very hard to get latency tweaks to stop the stuttering, 
still the speech is very poor with espeakup, and too much loading on the 
latency, while it smooths the voice a bit, also produces a sluggish and 
unresponsive keyboard.

2.  And this is the most compelling reason to use speech-dispatcher; if 
I am to get Orca running in LXDE, or some other X Windows configuration, 
we need speech-dispatcher to be running, because Orca needs it.

3.  It took ages to get it to work :(.  Open Source is fantastic but 
documentation is thin on the ground.  Often it is a case of just 
chucking stuff at a wall until something sticks.

Now a problem...pulseaudio.  The default configuration of 
speech-dispatcher is to use pulseaudio, which I hate with a passion.  
And what's more I could not get pulseaudio to run reliably and it 
constantly crashes.

ALSA?  Well...I was using ALSA originally, but ALSA is not good with 
more than one audio stream at a time, so listening to a screen-reader 
while listening to streamed music might make the Pi choke a bit.  Not 
that I am encouraging you to run more than a couple of things in one go, 
poor little Pi.

Then Rill and I were looking at Knoppix.  This is a flavour of Linux, 
not running on the Pi currently, that has some accessible variants, 
notably something called Adriane.  Anyway while we were playing with 
Knoppix I noticed that it uses speech-dispatcher configured using an 
audio library called libao.  Don't ask me what the 'ao' bit is, 'audio 
output' maybe?

Anyway now I have speech-dispatcher running on both Raspbian and Arch 
with libao, and......drum roll....ABSOLUTELY NO stuttering!!

I have had to do some tweaking of the program 'speechd-up', a program 
which connects speakup to speech-dispatcher.  For example speakup was 
saying 'capital' all the time for capital letters until I hacked the 
source of speechd-up and stopped it.

I also made some other interesting discoveries about speech-dispatcher 
that I could not find documented anywhere.  Among these are:

1.  Just commenting out a 'AddModule' directive in the config file does 
NOT stop sd loading it.  The actual module has also to be removed from 
the module path, and not just renamed, otherwise sd recognises it as a 
module and loads it anyway.

And also because of the stuff with triplets in path names (like 
'/usr/lib/arm-linux-gnueabihf', where the 'arm-linux-gnueabihf' bit is 
called a triplet), sd gets very confused aboute paths to modules and 
libao plugins.  I could have hacked the Makefiles to solve this but it 
was easier to just make soft links to simulate the right paths.

speech-dispatcher and the espeak API.  Like a lot of the programs that 
call espeak, sd does not implement the full espeak API, although it does 
better than most.  So I have been able to make some tweaks to things 
like sample-rate and buffer size in the espeak.conf file of sd.

Incidentally using sd I have been able to reverse the latency tweaks I 
made to the espeak source while we were trying to use espeakup.

One problem that remains is that Emacspeak is still stuttering. This is 
because Emacspeak does not use speech-dispatcher, but the espeak server 
that it uses interfaces directly to espeak.  I am looking into writing 
an 'Emacspeak to speech-dispatcher' connector.

All this effort has meant I have been writing SD cards faster than I can 
eat chocolate, and that's fast.  Infact I have busted two SD cards in 
the process.  The little plastic combs between the gold contacts have 
come away and sprung up. Rather than risk damaging the delicate card 
slot on a Pi, or leaving small fragments of plastic in the card slot in 
my screamingly fast desktop Linux machine, I threw these cards away.  I 
have now switched to using the little metal micro-SD to SD adaptors, on 
the grounds that these will not break.

Because I have been configuring and reconfiguring the Pi so much, I have 
written a mechanism which will run a series of scripts one after the 
other.  These scripts can be grouped into collections which reflect what 
I am trying to achieve.

The mechanism which runs these scripts I am calling my 'sausage 
machine', for reasons which should be obvious, and the individual script 
packages I am calling 'sausage packs'.

I have packs for:

Arch Linux using speech-dispatcher and libao
Arch Linux using espeakup
Raspbian using speech-dispatcher and libao
Raspbian using speech-dispatcher and ALSA
Raspbian using speech-dispatcher and installing Orca on LXDE.

and some others.  Some packs run after others.  For example the one 
which configures Arch for console speech can be followed by one which 
installs LXDE and Orca etc.

Now we have had Orca speaking on Raspbian and LXDE a couple of times, 
with help from Rill's young sighted friend Morgan.  But I have taken a 
step back from that to get speech-dispatcher running solidly on both 
Raspbian and Arch.

Now we have that, with Rill's continueing help, I can go back to trying 
to get Orca up and running and speaking immediately you type 'startx' to 
go into X.

So far we have done this with LXDE for a couple of reasons:

1.  Raspbian already has LXDE installed so it should be a matter of just 
uninstalling inaccessible apps when we have Orca speaking.

2.  Wikipaedia has a page comparing desktop environments and LXDE comes 
out on top as the leanest.  And after all, if it says that on 
Wikipaedia, it must be true, huh?

3.  Because both Raspbian and Knoppix use LXDE I have some reference 
systems to look at.

4.  The OpenBox window manager that Raspbian uses is very flexible for 
use of the keyboard, e.g. not using the mouse.

So...after a lot of rambling, a summary:

I am about to unleash Arch Linux onto Rill to see if she can break it, 
before I release it on the site for download.  When I release it on the 
site it is likely to come without Emacspeak initially, until I can get 
the Emacspeak to speech-dispatcher connector written.

Then with that done, I will get back to getting Orca running 
out-of-the-box on Raspbian.

I am beginning to think that given a couple of more weeks or so we can 
see a few different images up on the web site for download, including 
some which are talking GUIs.

And within a couple of months or so, more accessible images than you can 
shake a stick at.

Mike




-- 
Michael A. Ray
Analyst/Programmer
Witley, Surrey, South-east UK

The box said: 'install Windows XP, 7 or better'. So I installed Linux

Interested in accessibility on the Raspberry Pi?
Visit: http://www.raspberryvi.org/

 From where you can join our mailing list for visually-impaired Pi hackers

=========================================================== 
The raspberry-vi mailing list 
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of the 
Foundation.

Mike Ray, list creator, January 2013

Other related posts: