VoiceObjects Integration with NuEcho’s Grammar Server
December 1st, 2008 by Andreas VolmerWhen creating speech applications, being able to manage dynamic grammars is often a must. A few examples include
- Choosing from a user-specific list of accounts, reservations, transaction codes, …
- Asking the caller to identify with his password, date of birth, or security question;
- In a banking bill payment application, the “payee list” grammar can be dynamically generated based on the list of payees that has been set up by the user;
- Address capture: After asking the caller for the zip code, a “street” grammar can be generated dynamically with streets associated with the zip code.
Many more use cases for dynamic grammars can be found in the Nu Echo blog: Part 1 and Part 2.
Now, the question is: How to generate dynamic grammars? In particular, how to generate dynamic grammars at call time? The traditional approach is to create a JSP (or ASP, or PHP, or Perl …) page that is invoked at call time with a set of request parameters, returning the required grammar. Creating such pages is cumbersome at best.
Nu Echo, the VoiceObjects partner company specializing on grammar development tools, have come up with an interesting approach: They designed an easy-to-use yet powerful markup language for creating dynamic grammars. This Grammar Language extends the ABNF format with dynamic grammar directives that can access variables and objects passed to the instantiation service via an instantiation context. This context maps variable names to values.
Using this approach is fairly simple: You create a grammar template in ABNF format, maybe using the NuGram IDE. This grammar template needs to be uploaded (via HTTP PUT) to the Grammar Server (aka NuGram Server). At call time, the voice application instantiates the grammar, providing an instantiation context that contains the session-specific data via a HTTP POST command. This context must be provided in JSON format, a special string format representing, in a nutshell, structured key-value pairs. The Grammar Server hence creates the grammar which can finally be retrieved using a HTTP GET request.
Now, our idea was that while this sounds simple enough, it should be made even simpler for VoiceObjects developers. All the HTTP based communication with the Grammar Server that is going on behind the scenes should be automated. Also, creating JSON formatted strings shouldn’t be something VoiceObjects developers are bothered with.
What we came up with is the Grammar Server Connector that bridges between VoiceObjects applications and the NuGram Server. This connector uses NuGram Server’s HTTP API to upload, instantiante, and fetch dynamic grammars. All that the VoiceObjects developer has to do is, well, first create the grammar template. In the application, he maintains the instantiation context (i.e. the dynamic data that is known only at call time) in a Collection object. The Grammar Server Connector’s task is then to instantiate the grammar at call time.
To get you started with this new approach to dynamic grammars, I created a simple demo application that uses one single grammar template and a single, simple input state, asking the caller for a currency value – treating the actual currency (US Dollars, Euro, British Pound, Czech Koruny, Mexican Pesos …) as a dynamic value. You can download it, along with the installation package and comprehensive documentation here (scroll down to section “VoiceObjects Integration with NuGram Server”).




April 2nd, 2009 at 8:12 am
[...] about creating dynamic grammars) will be generally available soon. Maybe some of you remember my blog on integrating VoiceObjects Server with NuGram Server, where I showed how the combination of both products makes it easier than ever to manage dynamic [...]