January 17, 2021
Hot Topics:

Review: IBM WebSphere Voice Toolkit

  • By Hitesh Seth
  • Send Email »
  • More Articles »

Reusable Dialog Components

A key highlight of VoiceXML is that it truly integrates the web application development world with the interactive speech-based telephony applications. However, speech application development isn't easy. It involves the creation of complex dialogs for all the possible voice interactions. For instance, for a simple dialog to get a valid US state as the input, you would need to create a grammar which enlists all the states, etc.

Reusable Dialog Components are an extensive set of reusable dialog components which are available from IBM. They can be used within VoiceXML applications as sub-dialogs or templates. Currently included in the 2.0 release are subdialogs (with their associated grammars and VoiceXML code) for recognizing alphanumeric characters, selecting elements from a list, confirmaiton; processing input for credit card numbers/expiration dates, currency, dates, directions, durations, email addresses, numbers, social security numbers, street types, telephone numbers, time, URL, major cities of US, US states and time zones.

Reusable Dialog Components also include another smaller set of components--known as VoiceXML code templates--which represent a templated complex dialog flow created through a combination of multiple reusable subdialogs. For instance, the included address template can be used to get a user's address information. This template uses Alpha, AlphaNumeric, Confirmation, Number, Street Type, US Major City, US Postal Code and US State subdialog components. Other components included are templates for recognizing credit card information, date range, name and a time range. Reusability--although a simple concept--isn't easy to implement. For instance, the creation of a library of reusable components is one thing, but using those component easily in the application is another challenge. Voice Toolkit makes the job simpler for reusing the extensive dialog components by providing a simple wizard-based approach (shown in the figures below) for using a dialog component in a VoiceXML-based application.
Figure: Select a Reusable Dialog Component

Figure: Customize the parameters of the component

The following code snippets show the code that is generated by the wizard. The example below uses the US Postal Codes Dialog component to get a valid postal code as an input and pass it on to rest of the application.

view code example 1

By just making a few changes, the dialog can be completed into a complete application component. Once you start using the dialog components available, you can easily recognize the value gained by the usage of reusable dialog components and the time/effort that can be saved towards developing fully functional VoiceXML applications through an assembly of components and business logic.

view code example 2

Dynamic Application Development

Apart from the development of the static VoiceXML documents in the VoiceXML editor (which can also be used as templates for dynamic content), Voice Toolkit also provides dynamic VoiceXML application generation based on J2EE (Java 2 Enterprise Edition) based Web Application Development. The tool provides two basic wizards for JSP/Servlets based dynamic application generation - Database Web Page & Java Bean Web Page (shown below). Even though these wizards are quite basic, they provide a great deal of help in getting the basic application template ready.

view the Application Wizard

For instance, the Java Bean Web Page wizard generates a starter VoiceXML-based application based on a Java Bean. Let's complete our example from the reusable dialog component section. We create an example/prototype bean called "Weather" (this bean always returns the same weather for all postal codes; an actual bean however would call a web service from weather.com or some such service and get the actual weather for the postal code).

view bean example 1

Given the reference of the Weather bean to the "Java Bean Page Wizard," it generates the following JSP/Servlets based VoiceXML based Application:


view bean example 2


view bean example 3

Similarly, the Database Web Page Wizard generates the starter VoiceXML application using a SQL query. Voice Toolkit generates all applications based on Java Server Pages and Java Servlets specifications, and using the toolkit's support for either an embedded Apache Tomcat or IBM WebSphere Application Server, the application can be remotely or locally deployed and tested as well (using the Voice Application Debugger).


In summary, IBM WebSphere Voice Toolkit represents a comprehensive and integrated set of tools for VoiceXML application development. What sets it apart from the competition is the easy use of voice application debugging, dynamic application generation from Java Beans and relational databases and most importantly, the extensive set of reusable dialog components. What I would like to see in the coming versions is support for VoiceXML 2.0 standard (currently in draft stage) features and graphical grammar creation tools.


About Hitesh Seth

Hitesh Seth is Chief Technology Evangelist for Silverline Technologies, a global eBusiness and mobile solutions consulting and integration services firm. He is a columnist on VoiceXML technology in XML Journal and regularly writes for other technology publications including Java Developer’s Journal and Web Services Journal on technology topics such as J2EE, Microsoft .NET, XML, Wireless Computing, Speech Applications, Web Services & Integration. Hitesh received his Bachelors Degree from the Indian Institute of Technology Kanpur (IITK), India. Feel free to email any comments or suggestions about the articles featured in this column at hitesh.seth@silverline.com.

Page 3 of 3

This article was originally published on October 20, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date