|
|
The steps in the Grammar palette of the Cisco Customer Response Applications (CRA) Editor provide script designers with a way to specify a set of all possible spoken phrases and/or Dual Tone Multi-Frequency (DTMF) digits to be recognized by CRA applications and acted upon during run time.
![]() |
Note If you specify a Grammar tag with incorrect case in a Grammar step, the script goest to the Unsuccessful branch when it reaches this step. The Validate function does not detect this case mismatch. Ensure the proper case is used in every instance to avoid this issue.. |
This chapter contains the following sections:
Figure 10-1 shows the steps in the Grammar palette as they appear in the Palette pane of the CRA Editor.
Use the Language Grammar step to select a set of grammars based on the language context of the call.
Grammar selection is based on the standard search for a matching language. For example, assuming a language context of {L[fr_FR], L[en_GB]}, the search would return the first grammar defined for the following languages:
Figure 10-2 shows the customizer window for the Create Language Grammar step.
Table 10-1 describes the properties of the Create Language Grammar step.
Table 10-1 Create Language Grammar Properties
To use the Create Language Grammar customizer window to select a set of grammars, perform the following procedure:
Step 2 Click Add.
The Add Language Grammar dialog box appears. (See Figure 10-3 .)
Step 3 To choose the language to be added to the Language/Grammar list, take one of the following actions:
The Define Language dialog box appears. (See Figure 10-4 .)
The Define Language dialog box closes, and the name of the language appears in the Language text field of the Add Language Grammar dialog box.
Step 4 From the Grammar drop-down menu, choose the Grammar variable that stores the grammar information for the language.
Step 5 Click OK.
The Add Language Grammar dialog box closes, and the names of the language and grammar appear in the Language and Grammar columns of the Create Language Grammar customizer window.
Step 6 Repeat Steps 3 to 5 as needed to add languages and grammars as desired.
(If you want to modify an existing language, click Modify. The Edit Language Grammar dialog box appears, which contains the same fields as the Add Language Grammar dialog box and is configured in the same way.)
Step 7 Click OK.
The Create Language Grammar customizer window closes.
Use the Create Menu Grammar step to create spoken word and/or DTMF menus in which the user makes a single choice from multiple options.
Each step holds the equivalent phrases or digits for the menu in corresponding languages. For each Create Menu Grammar step you create, you must assign a script variable of type grammar as the output variable.
By default, the actual language in which any grammar is played is determined by the language associated with the contact. When you define multiple grammars to be available, the script chooses a single grammar based on the language of the contact.
Figure 10-5 shows the customizer window for the Create Menu Grammar step.
Table 10-2 describes the properties of the Create Menu Grammar step.
Table 10-2 Create Menu Grammar Properties
| Property | Description |
|---|---|
Phrases and/or digits, and tags, created with the Create Menu Grammar step |
To use the Create Menu Grammar customizer window to provide grammar for menus, perform the following procedure:
Step 2 Click Add.
The Add Phrase dialog box appears. (See Figure 10-6 .)
Step 3 In the Grammar field, enter a value directly or take one of the following actions:
Step 4 In the Tag text field, enter a tag name.
Tags for grammars are case-sensitive.
Step 5 Click OK.
The Add Phrase dialog box closes, and the names of the grammar and tag appear in the Grammar and Tag columns of the Create Menu Grammar customizer window.
Step 6 Repeat Steps 3 to 5 as needed to add grammars and tags as desired.
(If you want to modify an existing grammar, click Modify. The Edit Phrase dialog boxappears, which contains the same fields as the Add Phrase dialog box and is configured in the same way.)
Step 7 To import a list of phrases and tags delimited by tabs from a text file, click Import.
The Select a File dialog box appears. (See Figure 10-7 .)
Step 8 Browse to the desired file, and then click Open.
The Select a File dialog box closes, and the phrases and tags appear in the Grammar/Tag list of the Create Menu Grammar customizer window.
Step 9 Click OK.
The Create Menu Grammar customizer window closes.
The following sections describe the two types of grammar formats you can use to specify grammars:
The CRA Engine uses a language called Nuance Grammar Specification Language (GSL).
Table 10-3 describes sample expressions you can use to specify grammars in GSL.
The following are examples of GSL language statements:
In this example, the caller can say "I want" or "I need", followed by a number from zero to nine, and then either "pencil" or "pencils".
The Digit File Grammar Format (".digit") is based on Java Properties File, in which keys are defined as "dtmf-x", where "x" is from the set "0123456789*#ABCD" or one of "star" or "pound", where values are the corresponding tag to be returned when a key is pressed or recognized.
You can also use an optional entry defined as "word=true" to specify that the word representation of each DTMF digit should be automatically included during a recognition.
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Mon Jun 16 14:09:19 PDT 2003
All contents are Copyright © 1992--2003 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.