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

Grammar validates but fails in action. Detailed log files?

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Grammar validates but fails in action. Detailed log files?

Post by moshe »

This grammar validates successfully ("no errors encountered") but fails when I attempt to use it. I have caching turned off (property grammarmaxage is set to 0), so I'm confident that I'm working off the correct copy.

I call this grammar using <grammar srcexpr="grammarDir + '<?php echo $tnGrammar?>'" mode="voice" type="application/srgs+xml"/>, and I get the correct grammar.

Any suggestions? Is there some way to get details from the grammar interpreter as to what, specifically, failed? This is a pretty simple grammar that I've cut and pasted. I was a bit shocked that the grammar interpeter would let me include

Code: Select all

<?xml version="1.0" encoding ="UTF-8"?>
<!DOCTYPE grammar PUBLIC "-//W3C//DTD GRAMMAR 1.0//EN" "http://www.w3.org/TR/speech-grammar/grammar.dtd">
in the header without complaining that XML isn't a valid grammar command.

moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Post by moshe »

Just to be absolutely clear: I'm perfectly aware that the problem is probably due to incorrect syntax of my semantic tags. But I'd like to see some sort of method to find out what the problem is.

Of course, any advice about the correct formatting of semantics tags for your particular interpreter is more than welcome...

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

IVR code for Grammar validates but fails in action

Post by support »

Hi,

We will pass this request along for more detailed IVR log files for the next update of our IVR platform.

As for why the IVR grammar is failing, you would have to replace the "$" in your IVR code with "SWI_literal". Also, "$singleNumber" would have to be changed to "singleNumber". Inside of your grammar header, you would have to specify the type as well to "application/srgs+xml".

So, basically, your IVR code should look like:

Code: Select all

<vxml version="2.0">

<form>
<field>
<grammar type="application/srgs+xml" version="1.0" root="getPin" mode="voice" tag-format="semantics/1.0">

	<!-- Listen for confirmation number for old or new confirmations  -->
	
	<rule id="getPin" scope="public">

		<ruleref uri="#hearPin" />		

	</rule>
	
	<rule id="hearPin">
		<tag> SWI_literal = "" ;</tag>
		<item repeat="4-10">
			<ruleref uri="#singleNumber"/>
			<tag>SWI_literal = SWI_literal + singleNumber; </tag>
		</item>
	</rule>
	
	<rule id="singleNumber">
		<one-of >
			<item>1 <tag>SWI_literal = "1"</tag></item>
			<item>2 <tag>SWI_literal = "2"</tag></item>
			<item>3 <tag>SWI_literal = "3"</tag></item>
			<item>4 <tag>SWI_literal = "4"</tag></item>
			<item>5 <tag>SWI_literal = "5"</tag></item>
			<item>6 <tag>SWI_literal = "6"</tag></item>
			<item>7 <tag>SWI_literal = "7"</tag></item>
			<item>8 <tag>SWI_literal = "8"</tag></item>
			<item>9 <tag>SWI_literal = "9"</tag></item>
			<item>0 <tag>SWI_literal = "0"</tag></item>
		</one-of>
	</rule>

</grammar>
</field>
</form>

</vxml>
Just as a note, you could replace that <grammar> using this <field> tag:

Code: Select all

<field type="digits?minlength=4;maxlength=10">
This will allow you to say up to 4 to 10 digits as well.

Hope this helps.

Regards,
Plum Support
Last edited by support on Fri Feb 19, 2010 4:35 pm, edited 4 times in total.

moshe
Posts: 66
Joined: Wed Aug 15, 2007 5:36 pm
Location: Chicago
Contact:

Post by moshe »

Thank you for this information.

I see that neither my code (which was tuned for a different ASR system) nor your code meets the W3's SISR specifications. Is there documentation somewhere of what system plumVoice uses? In particular, I may have some more complicated grammars in the near future.

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

IVR system will be to spec with VoiceXML 2.0 and W3's SISR

Post by support »

Hi,

There is no specific documentation for ASR on the Plum IVR system. However, you should be able to follow the SISR specification for most usage. The one outstanding difference is replacing "$" with "SWI_literal".

For the next release, however, our IVR system will be to spec with VoiceXML 2.0 and W3's SISR specifications. There is no guaranteed date for this release yet.

Regards,
Plum Support

Post Reply