toolkit : docs : 2.0 : apps : tutorials : tutorial 001
Tutorial 1
This tutorial provides an introduction to the basic concepts involved in building a RAD application.

Instructions
First you will need to drag the appropriate objects onto the canvas. Left click and drag the following objects from the pallet to the canvas:

1 Start Object 2 Generic Objects 1 Goodbye Object

Next you should arrange the icons on the canvas as illustrated below, and draw the connecting lines. Details on naming and connecting the objects can be found below the canvas image.
To rename the objects, right click on them to raise the context menu, then select "Rename".

Type in the new name, followed by Enter. Any spaces in the name will change to underscores.

You can add a red output port to the state "question" by selecting "Add Output Port" from the context menu.

In order to connect the states, left click and drag from a red output port to the state which you wish to connect to.

If you draw an incorrect line, you can right click on the line and select "Delete Line" to delete it.
Once the states are properly connected and named, you're ready to move on to setting the prompts for each state. In order to open the prompt dialogue for a state, you'll need to double click directly on the icon for the state. Double clicking on the ports will open a different dialogue that will be discussed later. Enter the text below into the corresponding state's prompt dialogue.

questionAre you ready to learn?
not_ready_to_learnCome on, it will be fun!
goodbyeOkay, then proceed to lesson 2.



Once you've entered the text, select "Ok" at the bottom of the dialogue. This saves the prompt and closes the dialogue. Selecting "Cancel" will undo any changes that you've made since opening the dialogue.

The next step is to configure the speech recognition. RAD will only recognize words from a specific list of words that you give it. It does not currently support continuous, or "dictation" style speech recognition.

The red ports on the generic objects are the location where speech recognition is configured in RAD. If the proper words are spoken for a particular port, then the program will continue through that port and the line which connects it to the next state.

In the "question" state you set the prompt to ask "Are you ready to learn?". Now you've got to configure the red ports on that state to recognize the proper words. These words will allow you to control the program flow with speech recognition.

Double click on the left red port of the "question" state. This will open the vocabulary dialogue, where speech recognition is configured. In the left text box of the vocabulary area, type the following words, one to a line:

yes
sure
you bet
ok

Once you have entered the words in the left box, click on "Update Empty" and the pronunciations will appear in the right box. Click "Ok" to close the dialogue.



You now need to configure the right port of the "question" state. Follow the same procedure as above, but use the following list of words:

no
not yet
*any

NOTE: The *any entry is very important! When *any is added to a recognition port, the state will branch to that port if it is not confident about words in other ports. In this example, the state will branch left if it recognizes the responses "yes", "sure", "you bet", or "ok". It will branch right on "no", or "not yet". It will also branch right if it was uncertain about what the response was. This last behavior is due to the use of *any. Even if the user says something unanticipated, like "I'm afraid to learn", the *any will cause the program to branch through the right port.

Finally, click build, then run, and watch your application go!