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

SRGS grammar help

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
easwara
Posts: 1
Joined: Thu Jun 04, 2009 11:14 pm

SRGS grammar help

Post by easwara »

I need help with a grammar that needs to find out the spoken city name.

Here is what I got.


#ABNF 1.0 ISO-8859-1;
language en-US;
mode voice;
root $main;
tag-format <semantics/1.0>;

public $main =
"San Francisco":"San Francisco"|
"Chicago":"Chicago"|
"Des Plaines":"Des Plaines"|
...
...
...
...
...;

There is a big list. How can I write a decent well tuned grammar phrase to receive the city name?

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

IVR code for city-state grammar

Post by support »

Loading such a large IVR grammar manually would not work well. You should use our built in IVR city-state grammar. Refer here for more help: http://www.plumvoice.com/docs/dev/devel ... n_grammars .

Here is a sample IVR code snippet using it. Please note that sensitivity has been lowered to 0.2.

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
  <property name="sensitivity" value="0.8"/>
  <property name="confidencelevel" value="0.2"/>
  <var name="mycity" expr="''"/>
  <var name="mystate" expr="''"/>
  <form id="citystate">
    <grammar src="http://vxml.plumgroup.com/grammars/uscitystate.php" root="uscitystate" type="application/srgs+xml" mode="voice" />
    <initial>
      <prompt>Say the city and state.</prompt>
    </initial>
    <field name="city"/>
    <field name="state"/>
    <field name="county"/>
    <filled>
      <prompt>
        The city is <value expr="city"/> and the state is <value expr="state"/> in <value expr="county"/> county.
      </prompt>
      <assign name="mycity" expr="city"/>
      <assign name="mystate" expr="state"/>
    </filled>
  </form>
</vxml>

Post Reply