I used Dragon Naturally Speaking very briefly a few years ago and was thinking if it would be a viable solution for programming?

I was thinking more so if you break your arm or something that would be a major hinderance to programming.

This same question on SO but was never answered.

  • 5
    this is an interesting idea, but I think language syntax would really trip up anything not dedicated to working for that language
    – Ryathal
    May 16, 2012 at 15:12
  • 1
    Beyond the punctuation problem coding involves an awful lot of editing, something that voice control isn't going to be good at. May 16, 2012 at 16:19
  • 1
    Trying this with the amount of punctuation abuse common to most programming languages brings to mind Victor Borge's Phonetic Punctuation comedy skit.
    – hotpaw2
    May 16, 2012 at 16:43
  • Could you imagine working with autocomplete with VS? May 16, 2012 at 16:44
  • 1
    It might be an idea to use Dragon Dictate for stuff other than the actual coding, like compiling, launching the compiled app, composing/replying to emails, some common things that might distract or delay the actual coding.
    – Gortron
    May 16, 2012 at 17:35

5 Answers 5


I can answer this one from personal experience. A few years ago, I broke both arms in an accident. Since my job was full-time programming, this was a problem. With some help, I got Dragon installed on my laptop.

It was a waste of time.

Code isn't much like natural language; it is primarily written, not spoken. I know exactly what y_z = (x < 0 ? -x : x) + 2; means, yet I have no idea how I'd pronounce it, nor do I care.

Being a written-only language, code is very precise at the character level. There's a big difference between (x+2)*3 and (x+2*3). Speech-to-text programs are good at paying attention to words, not characters. Adding specific characters requires lots of saying things like "left parenthesis, x, plus sign, two, right parenthesis".

When I'm coding, I do a lot of moving and rewriting. Speech-to-text is good for a single stream of language. It isn't good for going back and forth all over the place.

A lot of the minute tasks in coding aren't equivalent to typing, which is all speech-to-text is good for. Think about how often you change tabs to look at some other module of code, or how often you fold and unfold a function in your editor.

So if you have a speech-to-text program, give it a try and see for yourself. I don't think you'll be too impressed.

Incidentally, don't break both arms at once. Break one at a time, it's much easier that way.

If I had had only one broken arm, I'd have just done all my coding one-handed. It'd still be quicker than using speech-to-text software.

  • I think how I'm going to program wouldn't be on my list of concerns if I broke both my arms...
    – Ryathal
    May 16, 2012 at 18:07
  • 3
    Not at first, sure. But when you're feeling better, have your laptop at home, yet won't be able to drive a car for a few months, you'd like to get some work done.
    – Joe
    May 16, 2012 at 18:13

For a working professional programmer (where time is money) with severe carpal tunnel or hand injuries (etc.), it may be far more efficient to hire a junior/intern "pair programmer", and let them do the "voice recognition" and typing.

  • This is a good thought. With pair programming, you could still be productive with two broken arms as long as you were working with a partner who knew how to type and how to write code.
    – Kyralessa
    May 17, 2012 at 20:38

Here's a link to a video from a Python Convention where Tavis Rudd explains how he customized Dragon Naturally Speaking using their Python plugin structure to create a vocabulary suited towards programming and editing in Emacs, vim and the terminal. An inspiring glimpse at the possibilities of voice recognition in the domain of programming and development.

Using Python to Code by Voice

Two years ago I developed a case of Emacs Pinkie (RSI) so severe my hands went numb and I could no longer type or work. Desperate, I tried voice recognition. At first programming with it was painfully slow but, as I couldn't type, I persevered. After several months of vocab tweaking and duct-tape coding in Python and Emacs Lisp, I had a system that enabled me to code faster and more efficiently by voice than I ever had by hand.

In a fast-paced live demo, I will create a small system using Python, plus a few other languages for good measure, and deploy it without touching the keyboard. The demo gods will make a scheduled appearance. I hope to convince you that voice recognition is no longer a crutch for the disabled or limited to plain prose. It's now a highly effective tool that could benefit all programmers...

  • 1
    would you mind explaining more on what it does and why do you recommend it as answering the question asked? "Link-only answers" are not quite welcome at Stack Exchange
    – gnat
    May 30, 2013 at 13:35
  • 1
    gnat - I updated the post to reflect why I think it's a relevant and useful resource. If links aren't appropriate for the format, I'll remove it. May 30, 2013 at 13:41

You can indeed build a programming by voice solution using Dragon NaturallySpeaking, but Dragon NaturallySpeaking is going to be only a small piece of the overall solution.

You need a lot of technology beyond simply turning voice into words in order to program by voice successfully. Some examples of the issues that must be addressed:

How do you enter unpronounceable words like ostreambuf_iterator? How do you handle the heavy levels of punctuation in programming languages? How will you switch between windows?

Generally it takes several months to build and learn a programming by voice solution. People like Joe that expect to get something working in a day or two are going to be sorely disappointed.

Moving back and forth works fine with voice given a reasonable set of commands. For example, you can easily specify the target line using its displayed line number mod 100. Moving by words or punctuation characters works well with programming languages for moving within a line.

You can find a lot more information about these issues in the programming by voice FAQ located at http://vocola.net/programming-by-voice-FAQ.html


Based on Joe's answer where the Problem is that you can not go back and forth:

You can use eye tracking additionally to solve this issue.

Programming languages can be readable. Smalltalk is quite readable.

10 timesRepeat: [
    Transcript show:'hello'.
    Transcript cr.

Imagine a programming language that is optimized for speaking. It can be done.

If I had asked my customers what they wanted they would have said a faster horse. - Henry Ford

In these terms: A spoken text input may not be it. But a speech controlled environment with programmable traits would be a step further.

Not the answer you're looking for? Browse other questions tagged or ask your own question.