cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1611
Views
1
Helpful
5
Replies

ASR dynamic grammar

denizcaglar
Level 4
Level 4

Hi,

Our development environment is CVP 8 and Nuance Recognizer 9. We are using static deployed grammar files on the nuance server and form elements on Call Stuido for ASR projects. But now we need to generate dynamic grammar related to customer spesific data on the runtime. Is it possible to do this on Call Studio with Nuance? Is there any docs or samples about dynamic grammars?

Thanks,

Deniz

5 Replies 5

janinegraves
Spotlight
Spotlight

Hi Deniz,

There are 2 ways to create a dynamic grammar.

1. Enter something in the VoiceGrammar setting that will return a valid

speech recognition grammar at runtime - since it's the Nuance server

that executes the HTTP request for the grammar. So if you had, for

example, a JSP - you could enter something like this:

http://serverName/insurancegrammar.jsp?acct={Data.Element.getAcct.value}*

*

The data in the query is optional, just there to show you how you might

pass an account number or something else.

2. The other way is to use Java to write a custom Dynamic Configuration

for a Voice Element - you specify in the General tab of the Form element

(and indicate to pass a Base Config - the Studio settings tab info).

The Dynamic configuration would execute multiple addSettingValue()

methods to add the VoiceKeyword settings

*For this you'll have to see the CVP Programming Guide and the CVP

javadocs*.*

*

voiceElementConfig.addSettingValue("voice_keyword","dental insurance

");

voiceElementConfig.addSettingValue("voice_keyword","health insurance

");

voiceElementConfig.addSettingValue("voice_keyword","medical

insurance[health]");

voiceElementConfig.addSettingValue("voice_keyword","car insurance ");

voiceElementConfig.addSettingValue("voice_keyword","auto insurance ");

voiceElementConfig.addSettingValue("dtmf_keypress","1 ");

voiceElementConfig.addSettingValue("dtmf_keypress","2 ");

voiceElementConfig.addSettingValue("dtmf_keypress","3 ");

Hi Janine,

Thanks for your detailed answer.

I tried the second option, it’s working but i think this is a dynamic element, not dynamic grammar. Because we have to write all the grammar files statically before, than with the dynamic element configuration, we choose the needed grammar files on the runtime, and only load these ones. For exapmle if i have 100 grammar files for 100 credit card types, i have to write these 100 grammar files before, with this solution, am i right? What i am looking is, if there is a way not to write these all grammar files before statically. For example i want to give all possible input utterances and the output result to a component and get the result. Only utterences and the output value differs between grammars, the grammar structure is too similar, because they are all for different card types. One solution may be creating the grammar file on the runtime as a file, putting it to the appropriate path on the nuance servers, load it and run. But i think this is not en easy solution, so i am looking if there is a component supplied by Cisco or Nuance for this issue.

The URL used in the voice grammar or drmf grammar setting could point to a jsp, or any server side code that returns a valid grammar.

The url is invoked by the nuance server at runtime.

Thanks,  Janine

Sent from my phone.  Please excuse typos.

Janine

My customer needs to validate customer address against set of up to 5 address pulled from DB based on postal code.

For example customer enters zip code 12345. in return DB queries 5 streets. CVP asks customer for his street and need to validate using Nuance ASR against array of streets from DB.

What is the right way to build it it in studio ?

Thanka

If you're storing all the returned street names into a session variable

(either into a java object like an Array, ResultSet, ResultSetList, or

into a String where each street is delimited by something like

semi-colon; ) - then you can easily use a java class to create a Dynamic

Configuration for a Form Element. It can easily loop through the results

and add them to the Settings as Voice_Keywords using the

addSettingValue() method.

Alternatively, you could store the results into a string (delimited by ;

or something similar) and then pass this to a dynamic grammar written as

a JSP that will parse the input and create a grammar that is returned to

Nuance at runtime.

You'd call the grammar in the Setting named Voice_Grammar and pass

something like:

http://IP/dynamicGrammar.jsp?streets={Data.Session.StreetList}

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: