[mythtv-users] [mythtv] MythTV for blind/visually impaired

faginbagin mythtv at hbuus.com
Wed Oct 10 01:47:10 UTC 2012


On 10/09/2012 09:44 PM, Helen Buus wrote:> On Tue, Oct 9, 2012 at 7:26 
PM, Lee Maisel <maisel at lobo.net> wrote:
 >  > Helen Buus wrote:
 >  >>
 >  >> Hi All,
 >  >>
 >  >> I think I've got something that Lee and his wife, Maria, will find
 > of some
 >  >> use and source that MP can tinker with. It's all in the attached 
file,
 >  >> mythspeech-0.1.tgz
 >  >
 >  > WOW!!!!  This is AWESOME!!!  She is SOOO  Excited!   The menu 
works, and
 >  > announces each option just as we wanted, going into recordings speaks
 > each
 >  > recorded show as it's  selected, etc.
 >  > The two issues so far:
 >  >
 >  > When looking at the program guide for live tv, nothing is announced
 > when you
 >  > move around the listings.  when leaving live tv, the menu still talks
 >  > properly.
 >  >
 >  > When playing music, nothing was announced there, and upon leaving
 > mythmusic,
 >  > the talking stopped.  I assume the process crashed.  What log should
 > I look
 >  > in?
 >  >
 >  > Thanks So much!!!!
 >  >
 >
 > For us others on the list, there are bits missing in this
 > conversation, because some of it is just between Lee and Helen.
 >
 > For myself, I have no need of this stuff, but am very willing to help
 > test. So if someone can point me to the file that Helen has provided,
 > I'd take a look and see if I can help.

Hi Nick,

You're quite right, I have been talking privately to Lee, also Monkey 
Pet, another developer interested in the topic. Since you've expressed 
interest, here's what's going on. I've been quietly following the posts 
on this topic and thinking and researching and tinkering, time permitting.

What I finally settled on was to modify mythlcdserver to talk to 
speech-dispatcher via its libspeechd library. You can read about it here:
http://devel.freebsoft.org/speechd
It is what Ubuntu 12.04's screen reader, Orca, uses.

I had first tried to do something with the work done by NCAM (National 
Center for Accessible Media), which can be found here:
http://ncam.wgbh.org/invent_build/analog/speech-solutions-for-next-generation-media-centers/technical-notes-on-talking-myt
But things have changed so much since that was done (on mythtv 0.21 in 
2008) that I abandoned it. FWIW, I had actually managed to get it 
working on mythbuntu 10.04.

Next, I started looking at using Qt's approach, which would require 
implementing Qt accessibility classes. If this were done, mythfrontend 
would then talk to the Orca screen reader. I have confirmed that, at 
least one other QT application, vlc, can generate speech through Orca 
and speech-dispatcher. More info on Qt accessibility support can be 
found in these links:
http://qt-project.org/doc/qt-4.8/accessible.html
http://blog.qt.digia.com/2011/08/23/accessibility-on-linux/
http://lists.qt-project.org/pipermail/interest/2012-March/001197.html
VLC's pop up menus don't generate speech, but the regular menus do, if you:
- turn on the Orca screen reader.
- export QT_ACCESSIBILITY=1
- start vlc from the command line.

Just as I was about to launch into the "Qt approach", Monkey Pet wrote 
Lee, to which he replied on the mythtv-users list, which prompted new 
discussion from others, especially Anthony Goggins, who tossed out the 
idea of doing something with how mythtv talks to LCDd, which is part of 
the lcdproc package. I took a look at it, and was able to get it working 
pretty easily using LCDd's curses simulation. So I took a look at the 
code for mythlcdserver and realized it wouldn't be that hard to modify 
that program to do the speaking. And that's what I've done. It's working 
for me and Lee (with some gotchas, more on that later) on 
Ubuntu/Mythbuntu 12.04. Monkey Pet has also gotten it working, although 
I don't know with what distro.

I chose to use the speech-dispatcher approach, as opposed to what was 
done for NCAM, because I believe it's a cleaner approach and consistent 
with the direction Ubuntu is going in w.r.t accessibility.

I don't think the work I've done should be the long term approach to 
adding accessibility to mythtv. There's a lot of info that isn't 
provided by mythfrontend to mythlcdserver, like program guide data and 
information about programs on live TV that mythfrontend shows if you 
just cursor up/down, but don't change the channel by pressing OK. Also, 
when I added the live TV support, I found it affected what happens when 
you watch a recording. It now tells you what you've just started to 
play, even though it just told you before you started playing it.

I believe that, long term, accessibility for the blind/visually impaired 
should be based on Qt's support for accessibility. However, that will be 
more work and I wanted to get something working in 0.25, since that is 
what Lee and his wife are using. IMHO, what I'm doing is a short term 
hack, although I am trying to make it as functional as possible without 
having to touch anything other than mythlcdserver code.

Lee and Monkey Pet have my first version. Since then I've added support 
for live TV and for mythmusic. Here's a link to the second version:
http://www.hbuus.com/~buus/mythspeech-0.2.tgz

Extract the file's contents with the command:
tar xzf mythspeech-0.2.tgz

This will create the directory, mythspeech-0.2, which will contain the 
following files:

installspeech: A shell script that will install the non-source files in 
the desired locations.

mythlcdserver: The 64 bit executable for *buntu 12.04 that does the 
speaking in response to messages from mythfrontend. It should be 
installed in $HOME/bin. I provide the executable for Lee's sake so he 
doesn't have to set up a development environment and compile mythtv from 
source.

mythspeech: A shell script that starts up mythlcdserver and makes sure 
logging output is captured in the directory, $HOME/mythspeech. It also 
works around a potential race condition to make sure mythlcdserver 
doesn't start until mysql, the database server, is up and running.

mythspeech-0.2.patch: This is a patch file that can be applied to the 
mythtv source. It only touches files in mythtv/programs/mythlcdserver.

xprofile: Shell code that should be added to $HOME/.xprofile to make 
sure mythlcdserver is started when the computer is rebooted.

To install:

If running mythbuntu 12.04 (it's pre-installed on ubuntu 12.04):
sudo apt-get install speech-dispatcher
Test it with the command:
spd-say "Hello world"

If you want to compile the source:
sudo apt-get install libspeechd-dev

cd mythspeech-0.2
./installspeech

To start mythlcdserver, execute the command:
$HOME/bin/mythspeech

Once these steps are done, you need to configure mythfrontend to talk to 
mythlcdserver.

- From the main menu, navigate to Setup -> Appearance.

- On the last page labeled "LCD device display" check "Enable LCD 
device". This will make available a number of other settings specific to 
LCD display devices. You don't need to change them, they don't affect 
the speaking done by mythlcdserver.

- Cursor down to "Finish". This will save the setting and throw you back 
to the main menu. If mythspeech successfully started mythlcdserver, and 
if speech-dispatcher is working properly, you should now hear "MYTH MAIN 
Menu Media Library". If not, it's time to check the log in $HOME/mythspeech.

Lee ran into a problem last night after going into mythmusic. We're in 
the process of troubleshooting it. I suspect it may have to do with his 
audio configuration. Speech-dispatcher is using his onboard audio device 
(I think via pulseaudio), while mythfrontend is using alsa and nvidia'a 
hdmi audio device. If that's the case, I may not be able to help him 
configure a stable audio configuration. I've been testing on my laptop 
with the built in speakers and haven't had any problems using the 
default audio configuration provided by either ubuntu or mythbuntu (I've 
got both installed).

I welcome any feedback, as well as thoughts on the mythlcdserver 
approach vs Qt accessibility vs NCAM vs something I haven't thought of. 
Also, if anyone can help with Lee's audio configuration, I'm sure he'd 
welcome it.

Regards,
Helen




More information about the mythtv-users mailing list