Platform SDK: Web Telephony Engine

Offering Menus to the Caller

If TTS rendering is enabled for an application, the WTE offers a menu to the caller by using TTS to render the text associated with all HTML elements within the menu's scope. If an element has a VOICEFILE attribute, the WTE plays the voice file instead of rendering the text associated with the element.

When offering a menu item, Web telephony combines the text or voice file found within the scope of the menu-item element with the prefix or suffix defined by the cue, cue-before, and cue-after CSS properties, if any of these are present on the element. The WTE offers the parts of a menu item in the following order:

  1. The cue-before property.
  2. The cue property.
  3. The text for the element, or the voice file specified by the element's VOICEFILE attribute, if present.
  4. The cue property.
  5. The cue-after property.

A prefix or suffix specified by the cue, cue-before, or cue-after property can be either a text string or a wave file. To specify a wave file, wrap the name and location of the file using 'URL()'. For example: "cue-before:URL(waves\ifyouwant.wav)".

The following example shows how to use menu-item prefixes and suffixes:

<P>Please select the type of vehicle you want.
<SELECT NAME="vehicle" SIZE=1 onchange="RecordSelection()">
    <OPTION VALUE="Sedan" STYLE="cue-before:'If you want a'; cue-after:', press 1'">Sedan
    <OPTION VALUE="Sport Utility" STYLE="cue-before:' If you want a'; cue-after:', press 2'">Sport Utility
    <OPTION VALUE="Minivan" STYLE="cue-before:' If you want a'; cue-after:', press 3'">Minivan
</SELECT>

The WTE would render the preceding menu as follows:

"Please select the type of vehicle you want. If you want a sedan, press 1. If you want a sport utility, press 2. If you want a minivan, press 3."