We have an onsite system and was trying to use the <grammar> function with the "voice" option but it doesn't seem to work. The below example works if I press 1,2 or 3. But if I say anything nothing happens. Wondering if I'm doing something wrong or if we have this option enable in our onsite system?
Thanks for the help!
Code: Select all
<form>
<field name="selection">
<grammar type="application/srgs+xml" root="voice_options" mode="voice">
<rule id="voice_options">
<one-of>
<item>sales</item>
<item>support</item>
<item>directory</item>
</one-of>
</rule>
</grammar>
<grammar type="application/srgs+xml" root="dtmf_options" mode="dtmf">
<rule id="dtmf_options">
<one-of>
<item>1</item>
<item>2</item>
<item>3</item>
</one-of>
</rule>
</grammar>
<prompt>
For sales, press 1 or say sales.
For tech support, press 2 or say support.
For company directory, press 3 or say directory.
</prompt>
<filled>
<if cond="selection == 1 || selection == 'sales'">
<prompt>You selected sales.</prompt>
<elseif cond="selection == 2 || selection == 'support'"/>
<prompt>You selected support.</prompt>
<elseif cond="selection == 3 || selection == 'directory'"/>
<prompt>You selected directory.</prompt>
</if>
</filled>
</field>
</form>