The best way to start building voice applications is to examine the Notes application included with Portal Server 7.1 software. The Notes application consists of a provider (NotesProvider) that uses template files for each type of access device (web browser, wireless device, and voice browser). The voice application template files for the NotesProvider are stored in the following directory:
/var/opt/SUNWportal/desktop/default/NotesProvider/vxml/Nuance
These files contain VoiceXML code in addition to template tags. The tags provide dynamic content when the dialogs are accessed. For example, the content.template file uses [tag:count] to retrieve the number of notes and [tag:note] tag to speak the notes using text-to-speech:
<prompt bargein="true"> [tag:note]</prompt>
The prompts for this voice application are Microsoft Windows audio (.wav) files, stored in the following directory:
/opt/SUNWwbsvr/docs/voice/en_US/prompts/gary
This path is constructed at runtime by concatenating the root directory (/voice), the locale identifier (en_US), a prompts sub-directory (prompts) and a persona (gary). The resulting path /voice/en_US/prompts/gary is relative to the web container directory /opt/SUNWwbsvr/docs.
Finally, each voice application must provide a grammar that allows the application to be selected from the voice desktop channel chooser. The grammar for the Notes application (notes.grammar) is located in the following directory:
/opt/SUNWportal/web-src/jsp/default/Notes/vxml/Nuance/grammars
This directory contains the following Nuance GSL grammar expression:
Notes [ (notes ?channel) ]
This allows users to select the channel by speaking the phrase notes or notes channel.