Controlling the Robot with Voice Commands
The downloadable project that accompanies this article, VoiceCommandInterface.csproj
is a multimodal speech application built with the Microsoft Speech Application Software Development Toolkit (SASDK), version 1.1. The SASDK is part of Microsoft Speech Server. A multimodal speech application is a Web-based application that lets users enter input via speech or traditional web controls.
|Figure 2. Start Page: The figure shows a screenshot of the start page for the sample application that lets you control an ARobot using a voice command interface.|
The start page for the application, default.aspx
(see Figure 2
), lets you speak voice commands into a microphone.
There are two advantages to using voice commands with your ARobot. The obvious advantage is that you can utilize a hands-free interface, freeing you from having to type commands on a keyboard. The second advantage is that it is much easier to speak a command such as "Go Forward", then it is to type the command, "!1m113" (the actual command that ARobot requires).
|Note: If you do not want to use a microphone and prefer to enter commands as text, you can use the Speech Debugging Console (see Figure 3) that loads automatically when a speech application is started. Text commands can be entered using the Input textbox and then clicking, "Use Text".
Examining the Command Level BASIC Program
|Figure 3. Speech Debugging Console: This debugging tool is part of the Speech Application Software Development Toolkit (SASDK), version 1.1, and lets developers enter input as text to determine how the Speech Engine would interpret the input if it were speech.||
|Figure 4. The Basic Stamp Editor: The Editor allows you to send a special BASIC program named <span class="pf">commandmode.bs2</span> to the ARobot.|
Roger Arrick's command-level program lets you send sequential commands to the ARobot. The advantage of using this method is that you do not have to write a program that anticipates every move the robot needs to make. Instead, you can just send specific commands (such as "Go Forward") to the robot when you want it to move forward.
The command-level BASIC program (commandmode.bs2) is available for download with the application that accompanies this article. I won't examine the code in that program because all you need to do is download it to the ARobot. You do that using the free Basic Stamp Editor.
After downloading the Basic Stamp Editor program and installing it, you should be able to open the commandmode.bs2 program using the Editor. You can then send the program to your ARobot by clicking the blue arrow icon from the Editor's toolbar (see Figure 4).
After sending the commandmode.bs2 program to the ARobot, you can use a straight-through serial cable or a wireless serial receiver to control the ARobot through the multimodal speech application discussed earlier.