[Idle-dev] Making Python Speech-Friendly Under IDLE

David Ascher DavidA@ActiveState.com
Wed, 6 Dec 2000 21:20:22 -0800 (Pacific Standard Time)


A few months back, after a scary bout with wrist pains, I spent a fair bit
of time thinking about how to code in Python w/o being bound to the
keyboard.  For what it's worth, I think that the answer lies in breaking
the whole serial token metaphors, and to think about coding at a higher
level of actions, such as "define a class", "define a function", "define a
method", "write a switch statement" (yes, I know there aren't any in
Python _syntax_, that doesn't mean people don't write them), etc.

My lazy experiments with speech recognition didn't prove very successful,
and my hands are still usable, even if more fragile, so I wasn't limited
to speech input;  I was also programming on hand-helds at the time, so I
focused more of my day-dreaming on coarse motor control UIs complemented
with custom visual UI elements.  I 'noticed' that one of the nice things
about Python (from a UI perspective) is that the branching factor is quite
low at any given context of a program, with some branches having much
higher probabilities of being what the programmer needs than others.  For
example, inside a class, the 'define-method' branch has a high likelihood
of being the correct branch to take, as opposed to an if-statement or a
looping construct.

There are UI elements such as pie chart controls which researchers have
shown to be quite successful 'choosing' mechanisms.  Giving those a
Bayesian flavor either by changing the slice widths or by organizing the
order of the choices around the pie could make the "most common path" a
very easily input one.  

I could go on like that for a long time, but that's probably useless
as I'm unable to commit the time it would take to expand these ideas.  I
just wanted to suggest that people think a little outside the box, and
examine the properties of the language.  The proposals I've seen on the
list so far could apply just as well to Perl as to Python, but the two
languages are fundamentally different and should be spoken differently =).

What I will do is volunteer to organize a get-together at IPC9 on the
topic, as long as it's over some drinks.  I'm pretty sure we can get a
couple of speech-recognition experts to partake. =)

--david ascher

PS: Hopefully I'll be able to implement some of these ideas in a future
    version of Komodo. =)