multiple grammars

17 views
Skip to first unread message

Jean Cérien

unread,
Mar 13, 2024, 11:01:53 AMMar 13
to UniMRCP

MRCP allows to send multiple grammars, and the first/best matching is matched by the ASR. There are on separate lines in the body message

The MRCPRecog function wont allow newlines, how can I pass these values ?

Regards
J.

Jean Cérien

unread,
Mar 14, 2024, 10:11:19 AMMar 14
to UniMRCP

I've dug a bit more.
If I have a dialplan function:
same => n,MRCPRecog("builtin:speech/grammarONE,builtin:speech/grammarTWO",options)

It works fine, I see the two grammars on separate line in the body of the RECOGNIZE command

If I send via AMI, it does not work:
EXEC MRCPRecog "builtin:speech/grammarONE,builtin:speech/grammarTWO",fr-FR&f=beep&p=uni2&t=10000&sit=false&sct=1000
   -- AGI Script Executing Application: (MRCPRecog) Options: (builtin:speech/grammarONE,builtin:speech/grammarTWO,fr-FR&f=beep&p=uni2&t=10000&sit=false&sct=1000)
app_mrcprecog.c:1092 app_recog_exec: MRCPRecog() grammar:
builtin:speech/grammarONE
app_mrcprecog.c:1107 app_recog_exec: MRCPRecog() options: builtin:speech/grammarTWO,fr-FR&f=beep&p=uni2&t=10000&sit=false&sct=1000

The quotes are discarded, and the second grammar is treated as an option

How can I avoid that ?

Ken Walker

unread,
Mar 14, 2024, 8:44:45 PMMar 14
to uni...@googlegroups.com
Have you tried using single quotes instead of double quoutes by chance?

From: uni...@googlegroups.com <uni...@googlegroups.com> on behalf of Jean Cérien <cerie...@gmail.com>
Sent: Thursday, March 14, 2024 7:11:19 AM
To: UniMRCP <uni...@googlegroups.com>
Subject: [UniMRCP] Re: multiple grammars
 
--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unimrcp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unimrcp/9a5c12db-e585-4675-af8a-719ded6520e5n%40googlegroups.com.

Jean Cérien

unread,
Mar 15, 2024, 8:31:40 AMMar 15
to UniMRCP
thanks. Yes, I've tried single, double quotes, escaping the comma, adding a \r\n in the string
No joy
Reply all
Reply to author
Forward
0 new messages