Page 1 of 1

Tags in srgs grammar supported?

Posted: Fri Jan 05, 2018 1:15 pm
by breeve
So the following grammar doesn't work in plumb. All I get is unrecognized when I press a digit. I had one without tag elements -- this works -- but I would get spaces between the digits when I had grammars with more digits allowed. This grammar runs fine in the Voxeo environment. What am I missing?

Code: Select all

<grammar type="application/srgs+xml" tag-format="semantics/1.0" root="ROOT" mode="dtmf" maxdigits="1">
    <rule id="ROOT" scope="public">
        <tag>out=""</tag>
        <one-of>
            <item repeat="1-1">
                <ruleref uri="#digit"/>
                <tag>out += rules.latest();</tag>
            </item>
            <item>"*"</item>
        </one-of>
     </rule>
    <rule id="digit" scope="public">
        <one-of>
            <item>0</item>
            <item>1</item>
            <item>2</item>
            <item>3</item>
            <item>4</item>
            <item>5</item>
            <item>6</item>
            <item>7</item>
            <item>8</item>
            <item>9</item>
        </one-of>
    </rule> 
</grammar>

Re: Tags in srgs grammar supported?

Posted: Fri Jan 05, 2018 1:44 pm
by support
Hi,

In order to help we will need a little more information. Can you explain the desired behavior for this grammar? Are you trying to create a grammar that collects either a single digit or the star key, or are you trying to collect multiple digits?

Regards,
Plum Support