View Single Post
Old 01-26-2011, 08:40 AM   #2
lrizzo
Member
lrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tongue
 
Posts: 23
Karma: 22222
Join Date: Oct 2010
Device: kindle3
Quote:
Originally Posted by Acorn View Post
I'm hoping to try and get some kind of a working form of voice control going for the Kindle.

This would be a great help to anyone who doesn't have the use of their hands and can't control their Kindle by pressing buttons.

I specifically wanted to try and get this functionality working for a friend of mine who has Multiple Sclerosis. This would allow her to read on her own, which she hasn't been able to do for a long time.

The practical stuff:

I'm not going to attempt to use the built in microphone, or anything like that. I'm just going to try and get remote execution of key input so that the voice recognition stuff can happen on a computer.

So the main thing I need to work out is, how do you simulate key presses via the command line?

I have a feeling that h1uke's Launchpad hack does exactly this, but I'm having trouble working out exactly what part of his code is responsible for sending the actual command, and how it is doing this.

If anyone could explain to me how one simulates a key press, then I could have a script on the computer trigger those keypresses over SSH when it receives the correct voice commands.

Thanks!
the way to simulate keypresses is to write the string "send NNN" to /proc/keypad or one of the other devices, where NNN is the appropriate keycode. For instance,

echo "send 104" > /proc/keypad

on a Kindle3 is the same as moving to next page.

You can find the device names and keycodes in keydefs.ini and launchpad.ini from my "Kindle Terminal" at http://info.iet.unipi.it/~luigi/kindle/

Finally, the microphone is available e.g. arecord test.wav records a file (you can stop with ctrl-c) that you can later play with aplay test.wav (and in C you can access the device using the ALSA API)

cheers
luigi
lrizzo is offline   Reply With Quote