property

Specifies speech parameters for an entire application, document, or form. Although the default value for each property is provided below, these values are subject to change. If your voice application relies on a specific value, set the property explicitly in your application root document.

<property 
expr = "ECMAScript_Expression"
name = "string"
value = "string"
/>

expr

An ECMAScript expression that evaluates to the value assigned to the property. This attribute is a Tellme extension.

value

The value to assign to the property. Values are specific to the property.

name

See the following list of attribute names.

The property element lets you specify default speech parameters for an entire application, vxml, form, or field.

The following example reads back a fictitious financial news story to the user. The bargeintype property is set to "hotword" because the story is lengthy, and we only want to interrupt the story if the user says "stop." The timeout property is set to zero because we want to transition to the query_repeat_story dialog immediately after the story ends.

<?xml version="1.0"?>
<vxml version="2.1"
 xmlns="http://www.w3.org/2001/vxml">
   <property name="timeout" value="1s"/>

   <form id="read_story">

      <field name="cmd">
         <!-- when story is finished, timeout immediately -->
         <property name="timeout" value="0s"/>
         <!-- only respond when the user says stop -->
         <property name="bargeintype" value="hotword"/>
         
         <prompt>
            <!-- play a story. typically this story would 
                 come from a dynamic feed -->
         On Wall Street today, 
         tech stocks rallied with the naz dack climbing 200 points. 
         Telecommunication giant A T and T 
         gained a collosal thirty points while software 
         maker Microsoft gained a strong twenty points 
         thanks to strong quarterly earnings.
         <break/>
         </prompt>
         
         <grammar mode="voice"
         root="root_rule"
         tag-format="semantics/1.0"
         type="application/srgs+xml"
         version="1.0"
         xml:lang="en-US">
                  <rule id="root_rule" scope="public">
                           <one-of>
                                    <item>
                                             <one-of>
                                                      <item>
                                                               stop
                                                      </item>
                                             </one-of>
                                             <tag>out.cmd = "cmd_stop";</tag>
                                    </item>
                           </one-of>
                  </rule>

         </grammar>

   
         <noinput><goto next="#query_repeat_story"/></noinput>
   
         <filled><goto next="#query_repeat_story"/></filled>

      </field>
   </form>

   <form id="query_repeat_story">
      <field type="boolean" name="yesno">

         <prompt>Do you want to hear this story again?</prompt>

         <catch event="noinput nomatch">
            Sorry. I didn't get that. 
            Please say yes to hear the story again.
            Say no to return to the main menu.
         </catch>
      </field>

      <filled>
         <if cond="yesno">
            <goto next="#read_story"/>
         <else/>
            <exit />
         </if>
      </filled>
   </form>
</vxml>

Community Additions

ADD
Show: