Larson Technical Services: Voice Technology Consulting

Exercise 13.3

Write two multimodal versions of Exercise 5.2

A.Write a multimodal dialog scenario for a “point and speak” dialog (Use notation similar to Figure 13.4.)

Step Prompt to User User Response
Spoken Displayed Spoken Keyboard/Mouse
1 Points to date field
2 Date field highlighted December 18, 2002
3 December 18, 2002 in date field Points to time field
4 Time field highlighted Three thirty PM
5 3:30 pm in time filed

B. Write extended VoiceXML code for a “point and speak” dialog.

<form name= "date_time">
      <field name = "date" > 
           <prompt><media type = "display"> date </media></prompt>
                     <mode = "voice" src = "date.grammar"/>
                     <mode = "handwriting" src = "date.grammar"/>

      <field name = "time" > 
           <prompt><media type = "display"> time </media></prompt>
                     <mode = "voice" src = "time.grammar"/>
                     <mode = "handwriting" src = "time.grammar"/>

C. Write HTML plus SALT code for a “point and speak” dialog.


     <form id="Date"     

     <input name="txtDate" 
            type="text" ev:event="onfocus" 

      <!-- Declare xhtml script handlers for setting inputs -->      

     <script ev:target="#Date" 
                 txtDate = voiceDate;      

       <!-- done xhtml script handlers -->       

      <input type="submit" 
        <input type="reset"/>   

<!--- declare the voice handlers. -->    

<vxml:form id="voiceDate">      
   <vxml:field name="Date">        
     <vxml:grammar src="date.srgf" 
     <vxml:prompt id="Dagte"> 
            Your name.        
<!-- done voice handlers. --> 

D. Compare the two versions with respect to programming style and lines of code required.

Extended VoiceXML is declarative code, while HTML plus SALT is event driven procedural code.

Return to the Instructor’s Page

Comments are off for this post