Talking Puppy (for the visually handicapped)

For talk and support relating specifically to Puppy derivatives
Post Reply
Message
Author
raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

Talking Puppy (for the visually handicapped)

#1 Post by raffy »

Is there a way to make the menu "talk" - play sounds rather than simply display items? Every highlighted item will "talk" itself out.

One function key (or key combination) should launch the menu. The rest of commands will be given keyboard shortcuts.

Maybe there are already packages for this purpose?

nibl in this forum has already done a text reader for Puppy - I hope his work can be shared here.
Last edited by raffy on Fri 10 Sep 2010, 14:34, edited 1 time in total.
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

Re: Talking Puppy (for the visually handicapped)

#2 Post by WhoDo »

raffy wrote:Is there a way to make the menu "talk" - play sounds rather than simply display items? Every highlighted item will "talk" itself out.

One function key (or key combination) should launch the menu. The rest of commands will be given keyboard shortcuts.

Maybe there are already packages for this purpose?
My recollection from some time ago was that MU gave us a text to speech reader that maybe could be adapted to do what you want. It was entered in a shell script with a parameter for the file to read. I tried it and it worked, although it did seem to have a slight German accent! :P
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

text 2 speech

#3 Post by Lobster »

Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#4 Post by HairyWill »

Raffy,
I've hacked jwm so that it calls a shell script everytime a menu entry is highlighted and am successfully using madplay to play small mp3 clips I have of the text that should be read.

I have used Festival to generate the sound clips. The disadvantage of this system is that it is limited to the 200 or so menu entries that I have made clips for.

I tried calling Festival directly from my script but because it gets called so many times a second it is complaining about /dev/dsp being already in use.

Ideally I would like to start the festival server and then call it directly from jwm using C but that will involve more reading on my part.

I had a look for stuff posted by nibl but coudn't find anything useful.
If you want to try it out I can package it up as a pet for you.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

#5 Post by willhunt »

I would really like to see that pet file please HairyWill
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#6 Post by HairyWill »

OK here we go:

for the impatient, the PET
install
http://users.ecs.soton.ac.uk/wmd04r/pup ... 1-i686.pet
restart X

now the warnings
It upgrades your JWM to 2.01, you may not like the default window border colour scheme you get. This can be replaced by putting a windowstyle declaration inside /root/.jwm/jwm-personal such as

Code: Select all

<WindowStyle>
<Font>FreeSans-9:bold</Font>
<Width>4</Width>
<Height>20</Height>
<Active>
<Text>white</Text>
<Title>#70849d:#2e3a67</Title>
<Corner>white</Corner>
<Outline>black</Outline>
</Active>
<Inactive>
<Text>#aaaaaa</Text>
<Title>#808488:#303438</Title>
<Corner>#aaaaaa</Corner>
<Outline>black</Outline>
</Inactive>
</WindowStyle>
The replacement jwm executable is placed in /usr/local/bin so it doesn't actually overwrite the existing one it just appears on the path earlier.
The menus don't work when you are listening to music.

included
I have included mp3 files for all the entries in my menus if you want more you will need to create them yourself. Extra mp3 files should be put in /usr/local/jwm-speak/clips/ the naming scheme should be fairly obvious.
If you have festival installed you can use jwm-speak_create-phrases.sh to regenerate the sound files based on your .jwmrc so you will have sounds for any menu items that I haven't included.

source
I had to hack the jwm source a small amount to do this so here is a link to my modified source.
http://users.ecs.soton.ac.uk/wmd04r/pup ... ook.tar.gz

no screenshot :-)
Last edited by HairyWill on Wed 11 Jul 2007, 13:45, edited 1 time in total.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

using it now - THANKS!

#7 Post by raffy »

Am using it now for Puppy 2.14 as well as for 2.12 (with flite binaries, compliments of nibl).

Am at a loss how to customize the sound tracks for the menu entries. Is it correct that madplay does the playing of mp3 files?

Another possibility of playing audio is via flite, in console/text commands, like "flite menu phrase" (no separate saving of mp3 file is needed). For building flite in Puppy, nibl says:
The binary depends on wxWidgets 2.63 (It is written in wxPerl which uses wxWidgets as its GUI, which is GTK+ based). It should be easy to move to any Puppy version which wxWidgets runs on. (It may require GTK version 2, not GTK version 1).
There is a dotpup of wxWidgets you can install, then it should work.
The latest flite I've seen is version 1.3.
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#8 Post by HairyWill »

Raffy,
jwm makes a call to /root/my-applications/bin/jwm-speak when there is something to say. The text to read is placed in /tmp/speak. So you could simply edit jwm-speak and place a call to flite there.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#9 Post by HairyWill »

I've just looked at the flite documentation and will try and incorporate it directly into jwm
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

#10 Post by willhunt »

Hairy the link is broken :cry:
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#11 Post by HairyWill »

Upgraded to 0.1.1

Link is live again, you'd think that a computer science school would be able to keep its servers up :oops:.

I've modified the shell scripts in /root/my-applications/bin so that they call flite directly if you have it installed. If you have the earlier version you might want to just update these two files rather than downloading the whole pet. The flite voice is lower quality but louder than the mp3s.
/root/my-applications/bin/jwm-speak

Code: Select all

#!/bin/sh

killall jwm-speak-delayed 2> /dev/null
killall madplay 2> /dev/null
killall flite 2> /dev/null
/root/my-applications/bin/jwm-speak-delayed &
/root/my-applications/bin/jwm-speak-delayed

Code: Select all

#!/bin/sh
#replace slash with hyphen ; remove leading spaces ; remove trailing spaces; replace spaces with hyphen 
PHRASE=`sed 's/\//-/g ; s/^[ ]*// ; s/[ ]*$// ; s/ /-/g' /tmp/speak`
CLIP="/usr/local/jwm-speak/clips/$PHRASE.mp3"
#sleep stops stuttering
usleep 1000
which flite && flite /tmp/speak || madplay "$CLIP" 2> /dev/null
I'm aware there is a problem with zombie jwm-speak processes my C programming isn't up to much. The zombies don't use any resources except process numbers and should die properly if you restart X.

@Raffy I presume you have flite connected to some applications to make it useful. Have you looked at emacspeak. I am fully sighted and can't use emacs but I suppose I have less incentive.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#12 Post by HairyWill »

Here is a pet for flite.
It is a single binary with a croaky voice.
usage
flite "A sentence to speak."
or
flite /root/myfile.txt

http://users.ecs.soton.ac.uk/wmd04r/puppy/flite-1.3.pet
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
cb88
Posts: 1165
Joined: Mon 29 Jan 2007, 03:12
Location: USA
Contact:

#13 Post by cb88 »

will looks like you beat me to maing a .pet of flite i'll link yours to the talking stick page
Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
X86: Sager NP6110 3630QM 16GB ram, Tyan Thunder 2 2x 300Mhz
Sun: SS2 , LX , SS5 , SS10 , SS20 ,Ultra 1, Ultra 10 , T2000
Mac: Platinum Plus, SE/30

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

highlight

#14 Post by raffy »

Will's flite binary is very useful, just command "flite" in console in any directory and go. :D

I wonder if flite can be used to read highlighted paragraphs or phrases. There must be a way of using the clipboard for this. :?:

User avatar
cb88
Posts: 1165
Joined: Mon 29 Jan 2007, 03:12
Location: USA
Contact:

#15 Post by cb88 »

@raffy I was thinking that too maybe a button on the taskbar to read selected text?

@hairywill do you know how to change the voice i spent a little time on it the other day but couldn't get it to compile after i changed the refeences to FL_VOX (i think that was it ) ti the kal somting or other voice maybe i was confused I'll have to read the readmes and stuff some more
Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
X86: Sager NP6110 3630QM 16GB ram, Tyan Thunder 2 2x 300Mhz
Sun: SS2 , LX , SS5 , SS10 , SS20 ,Ultra 1, Ultra 10 , T2000
Mac: Platinum Plus, SE/30

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#16 Post by HairyWill »

Sorry, I didn't investigate changing the voice.

Some sort of clipboard based tool would be cool, I notice that glipper supports plugins in python though I have no experience manipulating the clipboard.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

xcut

#17 Post by raffy »

A while back, Barry mentioned that xcut -p gets the clipboard contents.
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

its-me-again
Posts: 109
Joined: Thu 29 Apr 2010, 05:23

good idea

#18 Post by its-me-again »

I just want to say that instead of saying "Talking Puppy (for the visually handicapped)" you could say "Talking Puppy (for PEOPLE with visual imparmente" they are people first and are not handicapped.

they are PEOPLE who have a visual impairment. They are normal peoplw like you and me who think and act like the rest of us. Most don't have any mental loss ( as the turm handicapped is thrown around as.


other than that tops for staarting this topic and all.

here is a generailised disucion for a Pup-y os for any person with a disability
http://www.murga-linux.com/puppy/viewto ... 049#449049

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#19 Post by greengeek »

Just livening that last link from its-me-again and getting it on my watchlist:
http://www.murga-linux.com/puppy/viewto ... 049#449049
Other similar links at that thread.

Post Reply