[Freeswitch-users] load multiple grammar
Nagendra Babu
nb3868 at yp.com
Thu Jan 12 20:19:55 MSK 2017
Hi,
I need help regarding loading and activating multiple grammars.
Per FS-2906<https://freeswitch.org/jira/browse/FS-2906>, it is possible to load multiple grammars from FreeSwitch.
I have tried the same using following commands from my C# code. The FS version I have is 1.3.17.
InboundSession.Execute("detect_speech", "unimrcp {start-recognize=false}yesnod yesnod");
InboundSession.Execute("detect_speech", "unimrcp {start-recognize=true}yesno yesno");
I can see that there are two DEFINE-GRAMMAR requests sent to the LumenVox Speech Server. One with yesnod.gram and another with yesno.gram
But there is only one session mentioned in the RECOGNIZE request where as I am expecting it to be having both the sessions described in the DEFINE-GRAMMAR request.
Any idea?
MRCP/2.0 226 RECOGNIZE 3
Channel-Identifier: 115483E487508175CFDF at speechrecog
Content-Type: text/uri-list
Cancel-If-Queue: false
Start-Input-Timers: false
Speech-Complete-Timeout: 3000
Content-Length: 13
session:yesno
>>>> There should be session:yesnod also.
I do not see a way to do this in detect_speech.
Any help would be great.
Here is the define grammar message too...
MRCP/2.0 318 DEFINE-GRAMMAR 1
Channel-Identifier: 115483E487508175CFDF at speechrecog
Content-Type: application/srgs
Content-Id: yesnod
Content-Length: 158
#ABNF 1.0 UTF-8;
language en-US;
mode dtmf;
tag-format <semantics/1.0>;
root $yesorno;
$yes = 1 {out = "yes"};
$no = 2 {out = "no"};
$yesorno = $yes | $no;
01/12/2017 07:16:09.790,RECV,OnLoadGrammarRe,Received cseq grammar load (1) reply for CallIndex 51
01/12/2017 07:16:09.790,SEND,SendPacket ,
MRCP/2.0 116 1 200 COMPLETE
Channel-Identifier: 115483E487508175CFDF at speechrecog
Completion-Cause: 000 success
01/12/2017 07:16:10.123,RECV,ProcessRcvdPkt ,Got MRCP Message -
MRCP/2.0 408 DEFINE-GRAMMAR 2
Channel-Identifier: 115483E487508175CFDF at speechrecog
Content-Type: application/srgs
Content-Id: yesno
Content-Length: 249
#ABNF 1.0 UTF-8;
language en-US; //use the American English pronunciation dictionary.
mode voice; //the input for this grammar will be spoken words.
tag-format <semantics/1.0>;
root $yesorno;
$yes = yes;
$no = no;
$yesorno = $yes | $no;
01/12/2017 07:16:10.128,RECV,OnLoadGrammarRe,Received cseq grammar load (2) reply for CallIndex 51
01/12/2017 07:16:10.129,SEND,SendPacket ,
MRCP/2.0 116 2 200 COMPLETE
Channel-Identifier: 115483E487508175CFDF at speechrecog
Completion-Cause: 000 success
01/12/2017 07:16:10.459,RECV,ProcessRcvdPkt ,Got MRCP Message -
MRCP/2.0 226 RECOGNIZE 3
Channel-Identifier: 115483E487508175CFDF at speechrecog
Content-Type: text/uri-list
Cancel-If-Queue: false
Start-Input-Timers: false
Speech-Complete-Timeout: 3000
Content-Length: 13
session:yesno
01/12/2017 07:16:10.460,DEBG,SetRecPrmFrmHdr,Setting parameter 'Speech-Complete-Timeout' with value '3000'
01/12/2017 07:16:10.460,DEBG,SetRecPrmFrmHdr,Setting parameter 'Start-Input-Timers' with value 'false'
01/12/2017 07:16:10.460,DEBG,ConfPortForReco,Setting speech_complete_timeout to 3000 ms
01/12/2017 07:16:10.460,DEBG,ConfPortForReco,Setting sensitivity level to 50
01/12/2017 07:16:10.460,DEBG,ConfPortForReco,Setting Speed vs Accuracy to 0.5
01/12/2017 07:16:10.461,SEND,SendPacket ,
MRCP/2.0 87 3 200 IN-PROGRESS
Thanks and regards,
Nagendra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170112/c4bcdd60/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list