We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Can I use my own grammar for a <choice> instead of the

Answers to common Plum DEV questions

Moderators: admin, support

Locked
support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Can I use my own grammar for a <choice> instead of the

Post by support »

Yes. If you specify a <grammar> element within a <choice>, that grammar will be used instead of the automatically generated grammar.

Code: Select all

<menu>
  <prompt>Say sports, weather, or news</prompt>
  <choice next="#sports">
    <grammar>sports</grammar>
      One
  </choice>
  <choice next="#weather">
    <grammar>weather</grammar>
      Two
  </choice>
  <choice next="#news">
    <grammar>news</grammar>
      Three
  </choice>
</menu>

<form id="sports">
  <block>
    Sports
  </block>
</form>
<form id="weather">
  <block>
    Weather
  </block>
</form>
<form id="news">
  <block>
    News
  </block>
</form>

Locked