What is SpeakRight?

SpeakRight is an open-source Java framework for writing speech recognition applications in VoiceXML.Unlike most proprietary speech-app tools, SpeakRight is code-based. Applications are written in Java using SpeakRight's extensible classes. Java IDEs such as Eclipse provide great debugging, fast Java-aware editing, and refactoring. Dynamic generation of VoiceXML is done using the popular StringTemplate templating framework. Read more...

See Getting Started, Tutorial, and Table of Contents

Thursday, April 19, 2007

SpeakRight Reusable Objects (SROs)

One of the biggest challenges for a speech app framework is to maximise the reuse of common VUI dialogs. Collection of comon data elements should be reusable. This includes as time, date, currency, numbers, phone numbers, and zip code. Another area of commonality is user interface elements: login, main menu, "hot word" commands, list traversal, the enter-or-cancel pattern, and confirmation.

SpeakRight provides a set of reusable speech objects called SROs. They are configurable and extensible. Here is a list of the ways SROs can be "tweaked":

  • SROs have a full set of prompts, with main, silence, no-reco, and help prompts. Up to four escalations of each can be defined.
  • any or all prompts can be replaced. Each SRO has a subject, a word such as "flights", which is used to build prompts. Changing the subject word is the simplest way to adjust the prompts. There is an extension point for handling the plurality of subject words ("flight", "flights"). Or the entire prompt can be replaced.
  • prompts can be conditional, such as a prompt that only plays the first time an SRO is executed.
  • prompts can be defined at compile time, at runtime in code, or in external XML files.
  • grammars are replaceable. Inline grammars or grammar files can be used. The only restriction on a grammar is that it uses the slot names required by the SRO.
  • validation code can be added. This server-side code inspects use input and either accepts it or causes the SRO to re-execute.
  • Model binding. An SRO has a model variable name. When set, the user input results are bound to the model (i.e. stored in the model for later use by the app)
  • Command phrases can be added to an SRO. A common data entry pattern is the enter-data-or-say-cancel pattern. SROs have a list of command phrases that you can add to.
  • confirmation can be added. An SRO has a confirmation plug-in that can be used to add various forms of confirmation (explicit, implicit, or confirm-and-correct).

The current list of SROs is:
  • SROCancelCommand
  • SROChoice
  • SROConfirmYesNo
  • SRODigitString
  • SROListNavigator
  • SRONumber
  • SROOrdinalItem
  • SROTransferCall
  • SROYesNo
Adding new SROs is simple. Code-generation (using StringTemplate) generates a base class (eg. genSRONumber) that manages prompts and grammars. You only need derive the actual SRO class to add specific logic.

No comments: