CoffeeS1
Introduction
CoffeeS1 is the second sample application in a tutorial series named Coffee. It uses a consistent coffee shop motif. You will eventually be able to enter the shop, go to the order counter to order drinks, go to the gift store, or speak to management. The samples are intended to demonstrate speech recognition capabilities within an application. They are designed for the application-level (API) programmer and for those not familiar with speech technology. Writing engines such as speech recognition or text-to-speech, also called device driver programming, will be covered separately. Each sample will progressively add new features and increase in complexity. The tutorial chapters explain in detail the particulars of the code. You are encouraged to read each chapter.
As the second example, CoffeeS1 builds on the framework of CoffeeS0. There is one window and although there is a limited vocabulary from which to speak, it is expanded from CoffeeS0. CoffeeS0 restricted you to moving to the counter only. In contrast, CoffeeS1 now lets you order one of a variety of coffee drinks. After opening CoffeeS1, you may speak any of the commands. If successfully recognized, the window displays the response, "Please order when ready!" If the command was not successfully recognized, no action will take place. Due to the speed and processing capabilities of some computers, there might be a slight delay before CoffeeS1 responds. If after a moment nothing happens, try the command again.
Commands may not be recognized for two reasons. First, the speech may not have been clear. Perhaps the words were not spoken clearly enough or distinctively enough. Speak the command again more slowly and clearly. Second, the words spoken may not have been in the command list. Look at the available commands and speak again. CoffeeS0 has a limited command list. If a word used is not in the list, the command will not be recognized.
To quit CoffeeS1, click the Close button in the upper right of the window frame.
Commands
Command sequences are built using at least one word from among the various categories. Commands are grouped into two major (or top-level) categories: navigation and drink ordering. Navigation allows you to move around the coffee shop to places such as the counter, shop, or store. In CoffeeS1, the effects of going to any location are minimal and any navigation command takes you to the counter. The distinction allows the code sample to demonstrate additional SR features. Subsequent Coffee examples will expand on this. Drink ordering allows you to place drink requests.
In either case, words or phrases may be selected from each category. Some are marked as Required and others are marked as Optional. You must use at least one word or phrase from the list marked Required to successfully initiate the command. Optional words, though not required, provide a more natural speech. As a special case, the drink orders may include words from up to seven of the categories and may be spoken in any order. However, at least one category is required to successfully match command requirements.
For example, at the minimum you can say, “get me mocha.” This satisfies the command rules of the required phrase (“get me”) from the VID_EspressoDrinks required list and at least one of the seven other drink categories, in this case VID_DrinkType. Likewise, you could also say, “I would like a tall hazelnut two percent latte.” Words not appearing in the list may not be used. “Give me a latte,” would fail since “give me” is not on the list. “Please get me a” will also fail. Although the required top-level phrase is correctly used, a subsequent drink was not ordered. The following commands are available:
Command List
Choosing one word from each line of a category forms the command. Commands in parenthesis are optional and do need to be included. Words or phrases separated by slashes indicate any of the listed choices may be used although only one may be selected. Sections marked RULEREF indicate words or phrases may be chosen from the corresponding rule ID. Rule names are the same as listed in the corresponding XML configuration file.
Navigation
Requires a match from each VID_Navigation and VID_Place.
XML rule ID: VID_Navigation
· Optional: Please
· Enter
· Go to
XML rule ID: VID_Place
· Optional: The
· Counter
· Shop
· Store
Drink Ordering
Requires a match from VID_EspressoDrinks and at least one (but no more than seven) of the subsequent categories.
XML rule ID: VID_EspressoDrinks
· May I have
· Can I have
· Can I get
· Please get me
· Get me
· I'd like
· I would like
· Optional: a
XML rule ID: VID_Iced
· Iced
XML rule ID: VID_Decaf
· Decaf
· Decaffeinated
XML rule ID: VID_Shots
· Single
· Double
· Triple
· Quad
XML rule ID: VID_Size
· Short
· Tall
· Grande
XML rule ID: VID_Syrup
· Hazelnut
· Irish cream
· Almond
· Peppermint
XML rule ID: VID_Milk
· Nonfat
· Two percent
· Whole
XML rule ID: VID_DrinkType
- Latte/Mocha/Espresso/Americana/Cappuccino