I am using Asterisk AGI and using the following line to run speech recognition:
exec("MRCPRecog", "/usr/local/unimrcp/data/digits.jsgf,builtin:dtmf/number,t=10000&b=1&ct=0.7&spl=en-US");
That works fine and I see the response of what I'm saying (more or less) in the Asterisk CLI, such as...
[Dec 17 15:49:53] NOTICE[19462]: app_mrcprecog.c:488 recog_channel_get_results: (ASR-8) Result:
<?xml version="1.0"?>
<result grammar="grammar-0">
<interpretation grammar="grammar-0" confidence="99">
<instance>oh eight two three oh oh oh</instance>
<input mode="speech">oh eight two three oh oh oh</input>
</interpretation>
</result>
However, I cannot get this data from the Asterisk channel variable via AGI. The problem seems to be that the result code is blank for this response. The method getResultCode() in AgiReplyImpl returns -1 while trying to get that channel variable. I have no trouble getting the values of RECOGSTATUS and RECOG_COMPLETION_CAUSE.
If I try this same thing directly in the Asterisk dialplan, like so...
exten => 1111,n,MRCPRecog(/usr/local/unimrcp/data/digits.jsgf,t=10000&b=1&ct=0.7&spl=en-US)
exten => 1111,n,Verbose(Status is: ${RECOGSTATUS} and result is: ${RECOG_RESULT})
That works fine and I AM able to get the value of RECOG_RESULT.
Thanks for any help.
-Kevin