Add voice commands to your CAD system
The first time I activated the Language Bar (Speech Tools) in my Microsoft Word 2002 and started dictating this Design Idea, the on-screen title displayed "cat" instead of "CAD." By using the "Add/Delete Words" feature, I've trained the system to recognize the "CAD" acronym. This was my first experience with the MOSR (Microsoft Office Speech Recognition) tool, which is part of the latest Microsoft Office XP package. Its main operational modes are dictation and voice command. This Design Idea shows how to add a practical VCI (voice-command interface) to the simple CAD system inherent in MS Word 2002 applications. Reference 1 described a simple version of such a CAD for schematic entry. Click here to download some macros. The macros, grouped and stored in the MyCAD.dot file, extend CAD functions:
Module "mod_View" contains macros to set the drawing environment.
Module "mod_Symbol" contains macros to perform operations on Symbol objects.
The next level of CAD-system improvement is to add the custom VCI, enabling you to run macros via voice commands. Before use, the system prompts you to use the "Voice Training" session, which lasts approximately 15 minutes. As you read the text on the screen, the system analyzes your verbal patterns to build the Default Speech Profile. A longer session results in greater accuracy of speech recognition. The "Add/Delete Words" feature enables the MOSR engine to recognize special terms and technical jargon. Formatting the title provides a good example of practical use of the MS Word 2002 built-in Voice Commands, which correspond to its Menu and Toolbars buttons' Text. First, I selected the whole sentence by saying "select all," then I converted it to boldface by saying "Bold." Then I changed the font to Arial by saying "font," and, when the drop-down menu appeared, I pronounced "Arial." Finally, I set the font size to 14 points by saying "font size" and then "14," and I then underlined the title by saying "underline." You can add custom VCI by following several steps:
First, start MS Word 2002 and open a new file. Go to the Visual Basic Editor screen (shortcut: Alt+F11); add two standard modules, "mod_View" and "mod_Symbol"; and copy the macros you downloaded to the appropriate modules. The screen should look like the snapshot in Figure 1. From the "Debug" menu item, select "Complete Project", and then close the Visual Basic Editor window and save the file under the name "MyCAD.dot" using the "Save As" menu option. Add a custom toolbar by selecting from the menu "Tools—Customize—Toolbars—New." When a prompt appears, type the name for the new toolbar as "MyCAD Symbol Commands" and make it available to "MyCAD.dot." Add toolbar buttons related to the macros stored in MyCAD.dot. For each button, edit the button text; it defines the Custom Voice Command. The toolbars should finally look like the snapshot in Figure 2. Save the file and close MS Word 2002. You can consult Microsoft Office Help utility for more details on how to add custom toolbars and buttons.
Put the file MyCAD.dot into the MS Word or MS Office start-up directory. Typically, the path is "C:\Program Files\Microsoft Office\Office10\Startup." Then, start MS Word 2002, enable the macros in MyCAD.dot upon the system prompt, open a new document, and test the VCI with both built-in and custom voice commands. It's advisable to use a set of highly phonetic, distinctive words or phrases for VCI. If not, distortion and noise can lead to misinterpretation of the voice command by confusing it with another voice command. I tested the CAD with a VCI on a PC clone with a 600-MHz Athlon CPU. The system has 256 Mbytes of SDRAM-133 and runs Microsoft Office XP Professional under the Windows 2000 operating system. The voice-command execution delay is approximately 1 sec. For faster execution, you can use a faster CPU. For audio input, this design uses an inexpensive multimedia microphone. Table 1 shows sample test results for both built-in and custom commands.
The accuracy increases to almost 100% for the sample set of commands when you use a Plantronics (www.plantronics.com) headset with noise-cancellation features that comes with Microsoft's SideWinder game package. For more information on natural-language input technology in Office XP, refer to Microsoft Guidelines on the Web. The Web site has a link, "Hardware Guidelines for Speech Technologies." Note that, when you enable macros in MS Word or other applications, some macros could cause harmful actions, and some may contain viruses. You use the macros at your sole risk without warranties. To use the macros in the "mod_Symbol" section, you should uncheck the box "Automatically create drawing canvas when inserting AutoShapes." Go to the tabbed Dialogue: "Tools—Options—General."
Is this the best Design Idea in this issue? Select at www.ednmag.com.
Bell, Alexander, "Add CAD functions to Microsoft Office," EDN, March 21, 2002, pg 94.