006 - recognizer error

102 views
Skip to first unread message

Nasir

unread,
Apr 14, 2022, 12:44:31 PM4/14/22
to UniMRCP
Hi,

I am new to speech and specially Unimrcp with amazone Lex. I am using this tutorial to configure and test lex:   https://docs.unispeech.io/en/ums/asterisk/lex-polly

All steps have been completed successfully but when I dial from softphone and agi_lexv2.py gets launched by asterisk then I see the famous 006 recognizer error.

I have searched a lot but unable to find a proper resolution. Any help will be highly appreciated.

I can share the detailed asterisk cli output if required.

|Best Regards

Arsen Chaloyan

unread,
Apr 15, 2022, 2:58:37 PM4/15/22
to UniMRCP
Hi Nasir,

Please provide the UniMRCP server logs located in the /opt/unimrcp/log directory.

--
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/638d2ad1-f906-41d8-8236-cd26bab0cfadn%40googlegroups.com.


--
Arsen Chaloyan
Author of UniMRCP
http://www.unimrcp.org

Nasir

unread,
Apr 18, 2022, 6:21:55 AM4/18/22
to UniMRCP
Hi Arsen,

Thank you for coming back. I have attached the logs so please have a look and advise if there is anything we are doing wrong. I am new to speech and UniMRCP so any help will be highly appreciated. 

We are looking forward to purchase production license once trails go fine.

Cheers,
Nasir

unimrcpserver_2022.04.14_11.20.37.808063.log

Nasir

unread,
Apr 20, 2022, 5:53:02 AM4/20/22
to UniMRCP
Hi,

Can you please guide what is wrong? I have also tried using " MRCPRecog()" but still same issue is being faced. Is there anything to be looked specifically on AWS side?

Thanks.

Vahagn Kocharyan

unread,
Apr 20, 2022, 9:03:52 AM4/20/22
to UniMRCP
HI 
please set logger to debug on logger.conf try and share your logs. it looks like you have misconfiguration of bot
<source name="LEX-PLUGIN" priority="DEBUG" masking="NONE"/>

Thanks

Nasir

unread,
Apr 21, 2022, 7:55:51 AM4/21/22
to UniMRCP
Thanks  kochary for pointing it out,

I have recreated bot and IAM user and the after reconfiguring unimrcp, I tested and this time recognition is successful but on softphone I only here ending message saying "Thank you, see you next time" 
The initial message ""Welcome to travel agency. Would you like to book a Hotel or a Car?"" isn't playing.

Please also guide what I am supposed to get back result from bot... I try to say "I want to book hotel" and there is no response via mrcp while if I say same thing on aws bot's test page then it works fine and it asks for city to book hotel in..

I am attaching fresh log here. Your help will be highly appreciated.

Cheers,
Nasir

unimrcp_log.txt

Vahagn Kocharyan

unread,
Apr 21, 2022, 8:47:53 AM4/21/22
to UniMRCP
it seems that all is correct now .. please also share  asterisk logs. 

Thanks

Nasir

unread,
Apr 21, 2022, 9:18:53 AM4/21/22
to UniMRCP
Hi Kochary,

You are right, I had changed "RECOG_INSTANCE(0/0/textResponse/messages/0/content)" line previously for testing and reverting it back fixed the issue. Now I can hear initial prompt and lex bot recognizes my voice and responds properly. 

Thank you so much for your guidance and time. Now what I have to do is to route outgoing call from vicidial to lex bot so the called party can interact with bot and based on the result from bot, I will have to either hangup the call or transfer it to agent. 

I can send call to asterisk server using sip uri from vicidial but for parsing return values Can you please point me in right direction how I can achieve it. Is the response coming back from bot text or audio and how to find it out. I think it is related to the RECOGSTATUS, RECOG_COMPLETION_CAUSE or RECOG_RESULT statuses....etc

Regards,
Nasir

Vahagn Kocharyan

unread,
Apr 21, 2022, 5:55:45 PM4/21/22
to UniMRCP
 if you see in  agi_lexv2.py
we check RECOG_STATUS ,RECOG_COMPLETION_CAUSE . if these two variables not contain any error we process result. in other words  agi_lexv2.py process result. and you can see resturned results in asterisk cli or asterisk full log(if full log is enabled from /etc/asterisk/logger.conf)
From vicidial you must define route to agi extension in other words you must create extension for agi script and transfer call to this extension.


thanks

Nasir

unread,
Apr 22, 2022, 10:17:05 AM4/22/22
to UniMRCP
Thanks again,  Yes I observed those statuses... 
I have created a dialplan to send call from vicidial to asterisk's extension which the runs agi_lex2.py. I can hear bot prompts fine but now it doesn't recognize my replies when I dial from vicidial. 

Any thoughts what could be issue and what can be done. I can see RTP flows in both directions fine.

Thanks

Nasir

unread,
Apr 22, 2022, 10:46:33 AM4/22/22
to UniMRCP
Okay, changed the softphone from zoiper to eyebeam and its now recognizing speech fine. Will now try to route call to vici queue based on the result returned.

Thank you so much for your guidance. 

Vahagn Kocharyan

unread,
Apr 22, 2022, 3:46:45 PM4/22/22
to UniMRCP
okay. glad to hear that all works

Nasir

unread,
Apr 26, 2022, 5:38:00 AM4/26/22
to UniMRCP
Thank you so much for being so helpful... We are in testing phase now :)

Cheers!

Nasir

unread,
Apr 27, 2022, 5:17:15 AM4/27/22
to UniMRCP
Hi,

Wanted to confirm one more thing. As we know  RECOG_COMPLETION_CAUSE  and   RECOG_STATUS  statuses are filled with the result but how can we get the user input like if user says "option1" then how can we get this in our dialplan/agi... 
I see some xml is being displayed on asterisk CLI which contains all the words spoken by the called person but how to extract them in agi/dialplan so we can decide on basis of those?

Thanks

Vahagn Kocharyan

unread,
Apr 29, 2022, 8:51:58 AM4/29/22
to UniMRCP
Please refer comments in demo script 
you can get and process any json path with this command agi.get_variable('RECOG_INSTANCE(0/0/your/path)')

    def get_prompt(self):
        """Retrieves prompt from the data returned by bot"""
        prompt = agi.get_variable('RECOG_INSTANCE(0/0/textResponse/messages/0/content)')
        agi.verbose('got prompt %s' % prompt)
        return prompt

    def check_dialog_completion(self):
        """Checks wtether the dialog is complete"""
        dialog_action_type = agi.get_variable('RECOG_INSTANCE(0/0/intentResult/sessionState/dialogAction/type)')
        agi.verbose('got dialog_action_type %s' % dialog_action_type)
        complete = False
        if dialog_action_type == 'Close':
            complete = True
        return complete

  
Thanks

Nasir

unread,
Apr 29, 2022, 1:54:49 PM4/29/22
to UniMRCP
WOW Thanks man... much appreciated.
Reply all
Reply to author
Forward
0 new messages