• Idefisk
  • Tools
  • Tutorials
  • Reviews
  • VoIP Providers
  • Archives
ZOIPER softphone
AsteriskGuru Archives
Mailing List Archives
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[asterisk-speech-rec] 16 digits Card # recognition

 
   AsteriskGuru Archives Forum Index -> Asterisk-Speech-Rec
View previous topic :: View next topic  
Author Message
sshah at i2cinc.com
Guest





PostPosted: Wed Jul 04, 2007 5:36 pm    Post subject: [asterisk-speech-rec] 16 digits Card # recognition

Guys,

I'm willing to develop an IVR using AGI which will recognize the Voice input
from our cardholders. The basic functionality has been done but still need
some suggestion, recommendation to recognize the 16 digits card number, what
I want is:

1. Since I'm using en-US mode to make the system able to recognize only
digits from the caller, so my question is how can stick the digit's grammar
on 16 digits, like if less than 16, play some invalid message and same if
goes above 16?

Here is my current digits grammar:

#ABNF 1.0 UTF-8;
language en-US;
mode voice;
tag-format <lumenvox/1.0>;

root $Digits;

$Digit = (ONE:"1" |
TWO:"2" |
THREE:"3" |
FOUR:"4" |
FIVE:"5" |
SIX:"6" |
SEVEN:"7" |
EIGHT:"8" |
NINE:"9" |
(ZERO | O):"0" );

$Digits = {$=''} ($Digit {$+=$$})<1->;


I'd appreciate if anyone gives me some examples and hints or any other
optimal way for what I want.

Thanks,
Saud Shah
www.i2cinc.com




_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-speech-rec mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-speech-rec
Back to top
StephenKeller at LumenVox
Guest





PostPosted: Thu Jul 05, 2007 3:27 pm    Post subject: [asterisk-speech-rec] 16 digits Card # recognition

Saud,

There are a couple of ways you could do this. You could of course just
check the length of the output in your AGI app, but if you want to do
this within a grammar you just need to add a little bit of SISR
(basically JavaScript).

If you want to see some more about working with SISR, I recommend you
watch our video series on the subject at
http://lv-intranet/support/videos/semantic/vid01_summary.aspx

Here is a version of the digits grammar I threw together that should do
what you want. If it sees fewer than 16 digits, it returns "low" as the
semantic interpretation. Likewise it returns "high" if it sees more than
16.

#ABNF 1.0 UTF-8;
language en-US;
mode voice;
tag-format <lumenvox/1.0>;

root $Digits;

{var i=0};

$Digit = (ONE:"1" |
TWO:"2" |
THREE:"3" |
FOUR:"4" |
FIVE:"5" |
SIX:"6" |
SEVEN:"7" |
EIGHT:"8" |
NINE:"9" |
(ZERO | O):"0" );

$count = {$=''} ($Digit {$+=$$} {i+=1})<1->
{!{
if (i > 16) {$='high'}
else if (i < 16) {$='low'}
}!};

$Digits = $count {$ = $$};



Stephen Keller
LumenVox Support
P: 877-977-0707, just say "Support"
F: 858-707-7072
Support@LumenVox.com
www.LumenVox.com



Winner "Best Innovation in Speech Recognition"
AVIOS SpeechTEK Award




Quote:
-----Original Message-----
From: asterisk-speech-rec-bounces@lists.digium.com
[mailto:asterisk-speech-rec-bounces@lists.digium.com] On
Behalf Of Syed Saud Shah
Sent: Wednesday, July 04, 2007 10:32 AM
To: asterisk-speech-rec@lists.digium.com
Subject: [asterisk-speech-rec] 16 digits Card # recognition

Guys,

I'm willing to develop an IVR using AGI which will recognize
the Voice input from our cardholders. The basic functionality
has been done but still need some suggestion, recommendation
to recognize the 16 digits card number, what I want is:

1. Since I'm using en-US mode to make the system able to
recognize only digits from the caller, so my question is how
can stick the digit's grammar on 16 digits, like if less than
16, play some invalid message and same if goes above 16?

Here is my current digits grammar:

#ABNF 1.0 UTF-8;
language en-US;
mode voice;
tag-format <lumenvox/1.0>;

root $Digits;

$Digit = (ONE:"1" |
TWO:"2" |
THREE:"3" |
FOUR:"4" |
FIVE:"5" |
SIX:"6" |
SEVEN:"7" |
EIGHT:"8" |
NINE:"9" |
(ZERO | O):"0" );

$Digits = {$=''} ($Digit {$+=$$})<1->;


I'd appreciate if anyone gives me some examples and hints or
any other optimal way for what I want.

Thanks,
Saud Shah
www.i2cinc.com




_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-speech-rec mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-speech-rec


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-speech-rec mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-speech-rec
Back to top
Display posts from previous:   
   AsteriskGuru Archives Forum Index -> Asterisk-Speech-Rec All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™