[asterisk-speech-rec] Tags don't seem to work

Daniel Floyd daniel.floyd at jps.com
Thu Dec 14 11:50:01 MST 2006


I'm doing some experiments with the LV speech engine and Asterisk 1.2 and am
having problems with tags.  Specifically, I'm using the yesno.gram from the
pizza demo and if I read the grammar right, regardless of whether "yes",
"yes please", "yep", "yeah", "sure", or "correct" is said, "yes" should be
returned by the SPEECH_TEXT() function (or at the very least "correct"
should return "yes" -- it wasn't clear to me from the docs and other
examples if the tag held for the entire rule or just "correct" and since I
can't get tags to work at all, I couldn't test it to find out).  At any
rate, I always get back what was said, not the tag.  So if I say "correct",
SPEECH_TEXT(0) returns "correct", not "yes".  I thought the point was that
"yes" would be returned.  This happens in both my dialplan and with the
pizza demo.

I've looked through apps/app_speech_utils.c and res/res_speech.c, but
neither are very telling since they are both generic.  So I'm guessing the
interesting stuff is in res_speech_lumenvox.so which of course source is not
available for.  After looking at the Lumenvox API docs, I'm going to venture
a guess (assuming it isn't me) that maybe res_speech_lumenvox.so is only
returning the "terminal" nodes from the parse tree and not the "tag" nodes.
If that's the case, is there a way or plans to change this?  Seems like a
lot of the functionality is lost without tags.  

Here is yesno.gram I am using.  And once again, this is straight out of the
pizza demo.  I'm also using the lumenvox.conf file from the pizza demo
except with an additional grammar file I added for my own dialplan I'm
working on.

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

root $yesorno;
$yes = yes $GARBAGE|yep|yeah|sure|correct:"yes";
$no = no $GARBAGE|nope:"no";
$yesorno = $yes|$no {$=$$};
---------

Thanks,
Daniel
 



More information about the asterisk-speech-rec mailing list