mrcpserver的grammer是怎么回事
pengxinfa5 发布于2019-10-23 浏览:1220 回复:1
0
收藏

安装呼叫中心解决方案的mrcpserver后,freeswitch mod_unimrcp的grammar采用MRCPServer_190830-2/MRCPServer/mrcp-server/data/grammar/grammar_zh.xml,能够与mrcpserver通信,但一直没有result返回,若不用MRCPServer_190830-2/MRCPServer/mrcp-server/data/grammar/grammar_zh.xml,使用:

则会收到mrcpserver返回404。

freeswitch mod_unimrcp的grammar采用MRCPServer_190830-2/MRCPServer/mrcp-server/data/grammar/grammar_zh.xml时,mrcp_debug.log为:

10-23 19:31:52:816 [baidu/speech-arch/mrcp-asr/asr_engine_proxy.cpp:558][ASREngineProxy::get_grammar_body][channel_id:b5eb45d2f58811e9][content_id:5cf003d5-f684-4cf1-ae6b-fd1a323e2c7c] body:



1
2
3


10-23 19:31:52:817 [baidu/speech-arch/mrcp-asr/asr_engine_proxy.cpp:765][ASREngineProxy::get_recognize_body][channel:b5eb45d2f58811e9][request:2] body: session:5cf003d5-f684-4cf1-ae6b-fd1a323e2c7c
10-23 19:31:52:818 [baidu/speech-arch/mrcp-asr/recognizer.cpp:536][Recognizer::recognize][session:b5eb45d2f58811e9][request:2][recog_type:1] Start timestamp:2019-10-23 19:31:52.818
10-23 19:31:52:818 [baidu/speech-arch/mrcp-asr/asr_engine_proxy.cpp:636][ASREngineProxy::asr_channel_recognize][channel_id:b5eb45d2f58811e9]Recieve RECOGNIZE timestamp:2019-10-23 19:31:52.818
10-23 19:31:55:666 [baidu/speech-arch/mrcp-asr/asr_engine_proxy.cpp:880][ASREngineProxy::asr_channel_timers_start][channel_id:b5eb45d2f58811e9][request_id:2]timers started

freeswitch执行的脚本为:

session:answer()

--freeswitch.consoleLog("INFO", "Called extension is '".. argv[1]"'\n")
welcome = "/home/pxf/xeq.wav"
--
grammar = "hello"
no_input_timeout = 80000
recognition_timeout = 80000
--

tryagain = 1
while (tryagain == 1) do
--
session:execute("play_and_detect_speech",welcome .. "detect:unimrcp {start-input-timers=false,no-input-timeout=" .. no_input_timeout .. ",recognition-timeout=" .. recognition_timeout .. "}" .. grammar)
xml = session:getVariable('detect_speech_result')
--
if (xml == nil) then
freeswitch.consoleLog("CRIT","Result is 'nil'\n")
tryagain = 0
else
freeswitch.consoleLog("CRIT","Result is '" .. xml .. "'\n")
tryagain = 0
end
end
--
-- put logic to forward call here
--
session:sleep(250)
session:hangup()

收藏
点赞
0
个赞
共1条回复 最后由chrisberg923回复于2019-10-23
#2chrisberg923回复于2019-10-23

您好,呼叫中心问题请在控制台内提交工单咨询。

0
TOP
切换版块