hi, recently i doing asr test.
i use agi in java .
here is java agi:
String prompt = “welcome,please say something”;
String welcomeIVR = prompt + “,builtin:grammar/number,t=5000&b=1&ct=0.7&spl=zh-CN”;
channel.exec(“SynthAndRecog”, welcomeIVR);
String status = channel.getVariable("RECOG_STATUS");
System.out.println("status:" +status );
String result = channel.getVariable("RECOG_RESULT");
System.out.println("result:" + result );
the console result is below:
status:OK
result:null
but asterisk cli output line print result like:
[2019-08-07 15:42:26] VERBOSE[19017][C-00078f29] app_verbose.c:
The SynthAndRecog sounds fun ! I’ve not seen it, but it might be where your problem is. However, if you could modify that application, then you might be able to change the output of what gets saved into the RECOG_RESULT return variable or even add additional return variables such as RECOG_CONFIDENCE, RECOG_TEXT, RECOG_LOGID which Asterisk could then handle via standard dial plan configuration.
Also, what does the line you see on Asterisk CLI look like in your dial plan configuration … the specific Verbose() application call path that produces the XML you posted ?
the specific Verbose() application call path the XML .
the return result use NLSML format.
dialplan is :
exten => s,n(s1),Verbose(1, {RECOG_STATUS}, {RECOG_COMPLETION_CAUSE}, ${RECOG_RESULT})
Those were suggestions for new variables to consider. They (probably) don’t exist yet. But, I’ve got no idea what is happening in your SynthAndRecog application. Is that a third-party C module you’ve added to standard Asterisk ? Can you share the source for it ?