inputmodes

inputmodes

Default Value: “dtmf voice”

This property determines which input modality to use. The input modes to enable: dtmf and voice. To disable speech recognition, set inputmodes to “dtmf”. To disable DTMF, set it to “voice”. One use for this would be to turn off speech recognition in noisy environments. Another would be to conserve speech recognition resources by turning them off where the input is always expected to be DTMF. This property does not control the activation of grammars. For instance, voice-only grammars may be active when the inputmode is restricted to DTMF. Those grammars would not be matched, however, because the voice input modality is not active.

Example

<?xml version="1.0"?>
<vxml version="2.0">
  <property name="inputmodes" value="dtmf"/>
  <form>
    <field name="myfield" type="digits">
      <prompt>
        You will only be able to enter digits.
        Enter a number on your keypad.
      </prompt>
      <filled>
        You entered <value expr="myfield"/>.
      </filled>
      <nomatch>
        You did not enter a number properly.
        <reprompt/>
      </nomatch>
      <noinput>
        You did not enter anything.
        <reprompt/>
      </noinput>
    </field>
  </form>
</vxml>

Explanation

From this example, the “inputmodes” property allows the application to only understand DTMF instead of speech input.

Notes

When using the “inputmodes” property, please be mindful that when using multiple “inputmodes” within your code, the platform queues all properties at once up to the first non-bargeable prompt and/or first input element. For example, let's say you had two <form>s in your VXML code. The first <form> is set up with an “inputmodes” property set to “dtmf” only with just a bargeable prompt inside of a <block>. The second <form> is set up with another “inputmodes” property set to “dtmf voice” with a <field> to enter digits. From this setup, the “inputmodes” property in the first <form> would be ignored, allowing the user to bargein on the very first prompt by speaking some digits.

Last updated