How Can I Use Dictation Software to Write Code?

1k views Asked by At

I would like to use speech to text voice-recognition software to write code. Essentially, I would like to dictate code blocks based on predefined commands or scripts.

Instead of having to type up arbitrary code blocks (classes, if blocks, while blocks, methods etc.), I simply have predefined vocal scripts to dictate the code instead.

Have you and implementation of dictating code instead of typing?

2

There are 2 answers

0
AudioBubble On

I use Dragon NaturallySpeaking to dictate code instead of typing. I do this by creating predefined skeleton code within the script and simply dictate the script which pastes the skeleton code.

You'll find below an an example Dragon NaturallySpeaking script which does this:

Dragon Script Editor

Once you save your Dragon Script (depicted above), it gets placed into the Dragon script list or library (outlined below). By building up your personalized Dragon scripts you can dictate a substantial amount of code without typing.

enter image description here

I provided a video link outlining a demonstration of using voice dictation to write up Java code Dictating Code

The example I've used was with Java, but you can also build up your personalized dictation scripts for any coding language.

0
Ahmad Hosny On

I think you can use code templates if your IDE supports them. I prefer NetBeans as an IDE for my Java projects. It has some predefined code templates that will be expanded on pressing TAB button.

For example, if you type sout and press TAB it will be expanded to

System.out.println("");

with the caret placed between the double-quotes ready to get your string.

There are tens of code templates provided there, ranging from simple St that expands the String keyword to bigger blocks of code. The advantage of using this feature is that the caret will move to some predefined points that need to be filled. See Code templates in Netbeans

You can also add your own shortcuts and code templates, this might be useful and reduces typing you have to do by the dictation software.

I don't know about other IDEs such as IntelliJ or Eclipse, maybe they have something similarly productive there.