Page 1 of 1

SRGS grammar help

Posted: Thu Jun 04, 2009 11:18 pm
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?

IVR code for city-state grammar

Posted: Fri Jun 05, 2009 9:31 am
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>