Posted: Wed May 09, 2007 4:21 pm Post subject: [asterisk-speech-rec] Number: Semantic Interpretation CRM:00
Hector,
Attached is our numbers grammar for handling this situation. Try this in the Grammar Editor I think you will see that with this grammar and our Mexican Spanish model you will get the results you need.
From:asterisk-speech-rec-bounces@lists.digium.com [mailto:asterisk-speech-rec-bounces@lists.digium.com] On Behalf Of Hector Lopez
Sent: Wednesday, May 09, 2007 8:51 AM
To: Use of speech recognition in Asterisk
Subject: [asterisk-speech-rec] Number: Semantic Interpretation
Hello.
I have a big problem, i try to add and return a value in a numeric spanish grammar, my grammar is:
------------------------- gram_tally.gram--------------------------------------------
#ABNF 1.0;
language es-MX;
mode voice;
root $tally;
tag-format <lumenvox/1.0>;
$digitos = ("{S EY R OW:0}" {$="0"} | "{UW N OW:1}" {$="1"} | "{D OW S:2}" {$="2"} | "{T R EY S:3}" {$="3"} | "{K W AA T R OW:4}" {$="4"} | "{S IY N K OW:5}" {$="5"} | "{S EY Y S:6}" {$="6"} | "{S Y EY T EY:7}" {$="7"} | "{OW CH OW:8}" {$="8"} | "{N W EY BV EY:9}"
{$="9"}) { $ = parseInt($) };
$dieces = "{D Y EY S:10}" {$="10"} | "{OW N S EY:11}" {$="11"} | "{D OW S EY:12}" {$="12"} | "{T R EY S EY:13}" {$="13"} | "{K AA T OW R S EY:14}" {$="14"} | "{K IY N S EY:15}" {$="15"} | "{D Y EY S IY S EY Y S:16}" {$="16"} | "{D Y EY S IY S Y EY T EY:17}" {$="17"} | "{D Y EY S Y OW CH OW:18}" {$="18"} | "{D Y EY S IY N W EY BV EY:19}" {$="19"};
$decimas = ("{B EY Y N T EY:20}" {$="20"} | "{T R EY Y N T AA:30}" {$="30"} | "{K W AA R EY N T AA:40}" {$="40"} | "{S IY N K W EY N T AA:50}" {$="50"} | "{S EY S EY N T AA:60}" {$="60"} | "{S EY T EY N T AA:70}" {$="70"} | "{OW CH EY N T AA:80}" {$="80"} |
"{N OW BV EY N T AA:90}" {$="90"}){ $ = parseInt($) }[$digitos { $ += $digitos }];
Posted: Wed May 09, 2007 6:49 pm Post subject: [asterisk-speech-rec] Number: Semantic Interpretation CRM:00
Thank you Randal, it's works fine, i modified the grammar with my requeriments. I have a question, I need that lumenvox detect many sentences in the same grammar, like:
Attached is our numbers grammar for handling this situation. Try this in the Grammar Editor I think you will see that with this grammar and our Mexican Spanish model you will get the results you need.
From:asterisk-speech-rec-bounces@lists.digium.com [mailto:asterisk-speech-rec-bounces@lists.digium.com] On Behalf Of Hector Lopez
Sent: Wednesday, May 09, 2007 8:51 AM
To: Use of speech recognition in Asterisk
Subject: [asterisk-speech-rec] Number: Semantic Interpretation
Hello.
I have a big problem, i try to add and return a value in a numeric spanish grammar, my grammar is:
------------------------- gram_tally.gram--------------------------------------------
#ABNF 1.0;
language es-MX;
mode voice;
root $tally;
tag-format <lumenvox/1.0>;
$digitos = ('{S EY R OW:0}' {$='0'} | '{UW N OW:1}' {$='1'} | '{D OW S:2}' {$='2'} | '{T R EY S:3}' {$='3'} | '{K W AA T R OW:4}' {$='4'} | '{S IY N K OW:5}' {$='5'} | '{S EY Y S:6}' {$='6'} | '{S Y EY T EY:7}' {$='7'} | '{OW CH OW:8}' {$='8'} | '{N W EY BV EY:9}'
{$='9'}) { $ = parseInt($) };
$dieces = '{D Y EY S:10}' {$='10'} | '{OW N S EY:11}' {$='11'} | '{D OW S EY:12}' {$='12'} | '{T R EY S EY:13}' {$='13'} | '{K AA T OW R S EY:14}' {$='14'} | '{K IY N S EY:15}' {$='15'} | '{D Y EY S IY S EY Y S:16}' {$='16'} | '{D Y EY S IY S Y EY T EY:17}' {$='17'} | '{D Y EY S Y OW CH OW:18}' {$='18'} | '{D Y EY S IY N W EY BV EY:19}' {$='19'};
$decimas = ('{B EY Y N T EY:20}' {$='20'} | '{T R EY Y N T AA:30}' {$='30'} | '{K W AA R EY N T AA:40}' {$='40'} | '{S IY N K W EY N T AA:50}' {$='50'} | '{S EY S EY N T AA:60}' {$='60'} | '{S EY T EY N T AA:70}' {$='70'} | '{OW CH EY N T AA:80}' {$='80'} |
'{N OW BV EY N T AA:90}' {$='90'}){ $ = parseInt($) }[$digitos { $ += $digitos }];
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