Know your editor
When you begin your journey, understanding how to program using voice recognition, one of the biggest challenges can be working out which tools to invest time in. There are many editors available for programming but some are significantly more suitable for programming by voice than others. The biggest considerations are as follows:
- Is Select-and-Say available?
- Will existing macros work with the editor? Or will new ones be required?
- Does the editor have a template facility to assist with creating code?
- Is anyone else using this editor already to program using voice recognition?
- Is there a multiple clipboard facility available which could be adapted for voice commands?
Is Select-and-Say available?
Select-and-Say is a tremendously important tool when doing voice recognition work of any sort including programming. Select-and-Say is what allows the user to select mistakes by voice and train the computer how they should be said. Not all editors support this facility because it relies upon interaction between the editor and the voice recognition software. Dragon NaturallySpeaking uses the Windows COM interface to communicate with Windows controls. An editor which uses standard edit/rich text edit controls will almost certainly support Select-and-Say. It is possible to write a COM interface for any editor. One has been written for emacs, for example. However, if this is more work than you are prepared to commit to, choosing a standard editor which is already known to work is a good plan.
Will existing macros work with the editor? Or will new ones be required?
The speech recognition software which you are using will almost certainly come equipped with a set of macros designed to work in standard Windows controls. Commands like "delete previous word" will work in most Windows programs, for example. If you use an editor which does not accept windows (CUA) keystrokes, then you may have to write custom macros in order to be able to manipulate text. There are already macros available for many editors and there are some on my page for both vim and emacs.
Does the editor have a template facility to assist with creating code?
Code templates can be an excellent way of producing code quickly without having to pronounce a lot of syntax words. For example, it is much easier to say "iterate over array" and then the name of the array variable than it is to pronounce every piece of syntax in a for loop. Code template systems are available for many editors. I have adapted the Eclipse XML based code template system for my Eclipse Plug-in and there is one called ELSE available for emacs.
Is anyone else using this editor already to program using voice recognition?
Don't stick to an editor you always use simply because you are familiar with the quirks and keystrokes. It may well be worth finding out what others are using and seeing what works well from a voice recognition perspective. The most popular editors I know of that are being used for programming by voice are Emacs, Eclipse, Visual Studio and Win32Pad. Emacs, Eclipse and Win32Pad all have complete support for Select-and-Say. Emacs and Eclipse support code templates and have multi clipboards available.
Is there a multiple clipboard facility available which could be adapted for voice commands?
Sometimes when programming it's inevitable that you will have to spell or dictate something difficult. If you have done this once, dictating it a second time is very undesirable. It is therefore important to have some form of caching of unusual terms for later use. Emacs has this in the form of Cachepad and Eclipse also has this facility in the form of a plugin on my site