<token>

<token>

The <token> element defines words or other entities that may be spoken.

Attributes

Name
Data type
Description

xml:lang

String

Notes

For examples and usage information, please refer to the Speech Recognition Grammar Specification.

Example

<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <field name="pet">
      <grammar type="application/srgs+xml" root="ROOT" mode="voice">
        <rule id="ROOT">
          <token>nice</token>
          <one-of>
            <item>dog</item>
            <item>cat</item>
          </one-of>
        </rule>
      </grammar>
      <prompt>
        Say either dog or cat.
      </prompt>
      <filled>
        You chose a <value expr="pet"/>.
      </filled>
    </field>
  </form>
</vxml>

The output of the above script would be:

Computer: Say either dog or cat. Human: cat. Computer: You chose a nice cat.

Child Tags

None

Parent Tags

<item>, <rule>

Last updated