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?
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:
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
voiceElementConfig.addSettingValue("voice_keyword","car insurance ");
voiceElementConfig.addSettingValue("voice_keyword","auto insurance ");
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.
Sent from my phone. Please excuse typos.
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 ?
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
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
Please sign in to leave a comment.