need some guidance on Python syntax smart editor for use with speech recognition

Chris Angelico rosuav at gmail.com
Mon Jan 5 03:12:08 EST 2015


On Mon, Jan 5, 2015 at 6:43 PM, Eric S. Johansson <esj at harvee.org> wrote:
> The obvious answer is saving that meta-information in conjunction with the
> code but when working in a team environment, that information is going to
> drive you handies up the wall because it's going to visually overwhelm the
> actual code. Serving the meta-information separately will mean it's even
> harder to recover a speech friendly version of the code after it's been
> touched.
>

This, I think, is going to be your hardest problem to solve. Once
someone edits your code using a conventional set of tools, any saved
meta-information will be out of date, and that's a critical failure;
ergo you can't save anything, and have to deduce it all from the code.
So your only option, as I see it, is to devise some kind of 100%
reversible transliteration format.

Interestingly, this is sometimes needed between human languages.
Romanization of (say) Korean text involves representing the sounds of
the syllables in some kind of Latin script. If those transliterations
are perfectly reversible, you can manipulate the Korean text using a
US-English keyboard [1], while still producing correct Korean output.

It ought, in theory at least, to be possible to craft a reversible
transliteration between Python code and a more efficient speakable
form. You might have to place some restrictions on the Python code
(for instance, strict formatting rules, to avoid having spurious edits
when you use speech mode), and maybe you'd need a "fall-back" spoken
form that spells out the exact code, in case someone's done something
weird. But this would be something where you'd be better able to judge
than I am.

ChrisA

[1] I know this because I wrote myself a script to let me do exactly
that: https://github.com/Rosuav/shed/blob/master/translit.pike to make
https://github.com/Rosuav/LetItTrans/blob/master/Korean%20-%20%EB%8B%A4%20%EC%9E%8A%EC%96%B4.srt
(and other languages).



More information about the Python-list mailing list