load multiple grammar
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@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@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@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@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@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@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
Hi All, Any help on the ASR multi-grammar loading... Thanks and regards, Nagendra From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Nagendra Babu Sent: Thursday, January 12, 2017 10:50 PM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] load multiple grammar Hi, I need help regarding loading and activating multiple grammars. Per FS-2906<https://urldefense.proofpoint.com/v2/url?u=https-3A__freeswitch.org_jira_browse_FS-2D2906&d=DgMFAg&c=lXkdEK1PC7UK9oKA-BBSI8p1AamzLOSncm6Vfn0C_UQ&r=4vn6GyL2RTvgDexCyKjXiQ&m=gm7PE2iEUDFcjA5CHF38lzeV6rA5-HvzuoSI7c4ByL8&s=Y4x0U8q_g_Po-H23qSYRrgM7PmcIz7m5lvGxJj7aNqk&e=>, 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@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@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@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@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@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@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
On Jan 12, 2017, at 12:19 PM, Nagendra Babu <nb3868@yp.com> wrote:
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.
That appears to be some sort of random dev version from 5+ years ago. I’d suggest starting with looking at a a recent release and if you are still having issues work from there.
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@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@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@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@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@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@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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
Official FreeSWITCH Sites http://www.freeswitch.org <http://www.freeswitch.org/> http://confluence.freeswitch.org <http://confluence.freeswitch.org/> http://www.cluecon.com <http://www.cluecon.com/>
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users> http://www.freeswitch.org <http://www.freeswitch.org/>
participants (2)
-
Michael Jerris
-
Nagendra Babu