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

Canadian postalcode: alphanumeric voice recognition

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
w2gi
Posts: 46
Joined: Fri Jun 26, 2009 1:35 pm

Canadian postalcode: alphanumeric voice recognition

Post by w2gi »

Hi,
I want to improve the <grammer> for recognizing canadian postal code. So that, I want the first letter to be alphabet, second letter to be number, third to be alphabet, fourth to be number, fifth to be alphabet and sixth to be number. Is there a way to specify what <rule>(alphabet or digit) should be used when <item> is repeated?

vxml

Code: Select all

<grammar src="alphanum.grxml" type="application/srgs+xml" mode="voice" root="alphanum"/>
alphanum.grxml

Code: Select all

<?xml version="1.0"?>
<grammar type="application/srgs+xml" root="alphanum" mode="voice">
	<rule id="alphanum" scope="public">
		<item repeat="6">
			<item>
				<one-of>
					<item><ruleref uri="#alphabet"/></item>
					<item><ruleref uri="#digit"/></item>
				</one-of>
			</item>
		</item>
	</rule>
	
	
	<rule id="alphabet">
		<one-of>
			<item>a</item>
			<item>b</item>
			<item>c</item>
			<item>d</item>
			<item>e</item>
			<item>f</item>
			<item>g</item>
			<item>h</item>
			<item>i</item>
			<item>j</item>
			<item>k</item>
			<item>l</item>
			<item>m</item>
			<item>n</item>
			<item>o</item>
			<item>p</item>
			<item>q</item>
			<item>r</item>
			<item>s</item>
			<item>t</item>
			<item>u</item>
			<item>v</item>
			<item>w</item>
			<item>x</item>
			<item>y</item>
			<item>z</item>
		</one-of>
	</rule>
	
	<rule id="digit">
		<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> 
Thanks,
Saif

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

IVR alphanumeric grammar problem

Post by support »

Hi Saif,

About your grammar implementation, you cannot specify which <ruleref> you want to use as the zip code is being said.

About your alphanumeric grammar, the IVR will have difficulties in recognizing a Canadian postal code. Just as humans have difficulty in recognizing in spelling (for example, f's and s's, m's and n's) from each other, the IVR will have problems as users are spelling out the digits and numbers.

You could try implementing a military alphabet grammar into your code, but it would to tough to expect your users to know the military alphabet.

Here are some previous posts that address this issue:

http://support.plumvoice.com/viewtopic.php?t=955
http://support.plumvoice.com/viewtopic.php?t=927

Regards,
Plum Support

Post Reply