Hand to Mouth: Assistive Technology

Entries tagged as ‘programming by voice’

Dragon/speech friendly Notepad replacement for voice coders

September 30, 2009 · Leave a Comment

If you’ve tried to code by voice, you’ve likely realized that there are no compilers that support select and say. (If you found one, tell me, please.) Therefore, you dictate the code into Notepad, then copy and paste it into a compiler such as Visual C++, then try to compile and run it. The rub comes if Visual C++ turns up errors. It will helpfully give you the line numbers, and you may even be able to tell Dragon to go down the number of lines. The problem is that Visual C++ is MISERABLE when it comes to selecting and correcting text, and even dictating. Therefore, you have to go back to the original code in Notepad, find the errors there, fix them in Notepad, copy the document, go back into Visual C++, delete the code there, and paste the new code.

The problem with Notepad is that it doesn’t display line numbers; you have to count down the lines yourself. If you have a fair amount of code, your eyes may trick you and you might skip lines, making it rather tedious. But I found a program that might make it a little easier to dictate and vocally edit code. It’s the one Notepad replacement program out of I don’t know how many I tried that actually supports select and say: Win32Pad by Gennady Feldman. Even better, it has line numbering.

The line numbering is not turned on by default. It’s under View — Line Numbers. (The menus are vocally accessible as well. There are also keyboard shortcuts for most major functions.) Once you have turned on line numbering, it becomes easier to tell Dragon to go down or up some number of lines to find your error and correct it. Dragon’s own “go to line” command doesn’t work, but Win32Pad has its own shortcut, which you can access by saying “Edit,”then “go to line,” then saying the line number and OK. You could also tell Dragon to press Control G.

Categories: Disability · Technology
Tagged: , , , , , , , ,

Teaching Dragon to speak C++

August 2, 2008 · Leave a Comment

 

I finally graduated! So, to bide my time while I’m waiting for a job, I have decided to teach myself C++. I bought Teach Yourself C++ in 21 Days and downloaded Dev C++ from Simtel. I know I can’t do much with it; I just want to know roughly how it works. Problem is, I thought, that even with the Maltron I wouldn’t have the stamina in my hand for it. Enter the Dragon…

 

I’m now very glad I sprang for the Preferred version of Dragon 9.5. This version allows you to create text macros, which you insert by saying the command you assigned to that text. I did not know that computer code could be pronounced, although I knew it was considered language. The trick to dictating code is to tweak the pronunciation into something Dragon can understand. You will have to create commands for each bit of code (can I call them words?) you want to use. For example: std::cout is pronounced, according to the book, as “STD see out.” So, if you want to be able to dictate that into your compiler:

 

  • Tools on Dragon menu

  • Add new command

  • Say “S. T. D. see out” as the command name (without quotes). Always treat individual letters like initials, and Dragon will have no problem with them.

  • Put the same thing as the description, if you want.

  • For the content, simply spell std::cout

  • Save command

  • Repeat for new “words”

 

Sometimes, instead of treating everything like an initial, you can invent another word as long as you train it. For example, when I created the command for int main() I actually added another vocabulary word called “int,” and pronounced it as such. That way, when I put in the command name I could use “int main” instead of “I. N. T. main.” Saying “int main” is much simpler.

 

I should add, also, that Dev C++ works very well with Dragon. I can dictate the code into there directly without having to use Word or something as a buffer. The only thing I can’t do is access the menus by natural language — that is, to execute or compile a code I have to say “press Control F9″ instead of just “execute” or “compile.” But that’s no big deal. You do also have to be careful how things get spaced when you dictate; every once in a while you have to insert the spaces yourself because I think Dragon treats it like something in Spell mode. But on the whole, it’s excellent. I’m looking forward to learning more as I go along — I will need the distraction!

 

Note: I have heard that there are projects being developed specifically for dictating code itself, without having to jigger with the pronunciation or making new commands, but I haven’t seen any. This looks like it will work well for the interim. If you have used any specifically code oriented speech recognition program, I’d love to hear about it.

Categories: Disability · Technology
Tagged: , , ,