AaronZhangL / unimrcp

Automatically exported from code.google.com/p/unimrcp
Apache License 2.0
0 stars 0 forks source link

MRCPRecog doesn't play file by using option -f #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Use command in dialplan 
exten => 
8000,1,MRCPRecog(http://192.168.22.116/vxml/tstgrammar.xml,f=/data/sound/palmira
3)
2. File data/sound/palmira3 Format PCM 16bit, mono, frequency=8000, size 133240 
bytes
3. In asterisk console log writes

 app_unimrcp.c:4830 app_recog_exec: Filename to play: /data/sound/palmira3
 app_unimrcp.c:5028 app_recog_exec: file length:66598

Full console log see below 

What version of the product are you using? On what operating system?
ubuntu 8.10
asterisk 1.6
uni-ast-package-0.2.0

Please provide any additional information below.
 == Using SIP RTP CoS mark 5
    -- Executing [8800@default:1] Answer("SIP/1002-08decf58", "") in new stack
    -- Executing [8800@default:2] MRCPRecog("SIP/1002-08decf58", "http://192.168.22.97/vxml/tstgrammar.xml,f=/data/sound/palmira3") in new stack
[Jun 15 19:28:17] NOTICE[5251]: app_unimrcp.c:4711 app_recog_exec: 
Option=|f=/data/sound/palmira3|
[Jun 15 19:28:17] NOTICE[5251]: app_unimrcp.c:4827 app_recog_exec: Grammar to 
recognize with: http://192.168.22.97/vxml/tstgrammar.xml
[Jun 15 19:28:17] NOTICE[5251]: app_unimrcp.c:4830 app_recog_exec: Filename to 
play: /data/sound/palmira3
[Jun 15 19:28:17] NOTICE[5251]: app_unimrcp.c:4908 app_recog_exec: DTMF enable: 
0
[Jun 15 19:28:17] NOTICE[5251]: app_unimrcp.c:4097 unimrcp_log: Create MRCP 
Handle 0x8e4ef28 [speech-nuance5-mrcp1]
[Jun 15 19:28:17] NOTICE[5198]: app_unimrcp.c:4097 unimrcp_log: Create RTSP 
Handle 0x8e50f30
[Jun 15 19:28:17] NOTICE[5198]: app_unimrcp.c:4097 unimrcp_log: Add Control 
Channel 0x8e4ef28 <new@speechrecog>
[Jun 15 19:28:17] NOTICE[5201]: app_unimrcp.c:4097 unimrcp_log: Established TCP 
Connection 192.168.22.148:38906 <-> 192.168.22.230:8000
[Jun 15 19:28:17] NOTICE[5198]: app_unimrcp.c:2326 speech_on_channel_add: 
(ASR-1) DTMF generator created
[Jun 15 19:28:17] NOTICE[5251]: app_unimrcp.c:5028 app_recog_exec: file 
length:66598
[Jun 15 19:28:17] NOTICE[5251]: app_unimrcp.c:5204 app_recog_exec: Recognizing
[Jun 15 19:28:22] NOTICE[5251]: app_unimrcp.c:5323 app_recog_exec: 
Result=|<?xml version="1.0"?><result grammar="session:"><interpretation 
confidence="52" grammar="session:"><input mode="speech" confidence="52" 
timestamp-start="2010-06-15T0-00-03.20" 
timestamp-stop="2010-06-15T0-00-03.75">москва</input><instance 
confidence="52"><vout 
confidence="52">msk</vout><SWI_literal>москва</SWI_literal><SWI_grammarNam
e>session:</SWI_grammarName><SWI_meaning>{vout:msk}</SWI_meaning></instance></in
terpretation></result>|
[Jun 15 19:28:22] NOTICE[5201]: app_unimrcp.c:4097 unimrcp_log: Destroy RTSP 
Handle 0x8e50f30
[Jun 15 19:28:22] NOTICE[5198]: app_unimrcp.c:2289 speech_on_session_terminate: 
(ASR-1) DTMF generator destroyed
[Jun 15 19:28:22] NOTICE[5198]: app_unimrcp.c:4097 unimrcp_log: Destroy MRCP 
Handle 0x8e4ef28
[Jun 15 19:28:22] NOTICE[5251]: app_unimrcp.c:1982 speech_channel_destroy: 
(ASR-1) Audio queue destroyed
    -- Executing [8800@default:3] Hangup("SIP/1002-08decf58", "") in new stack
[Jun 15 19:28:22] NOTICE[5201]: app_unimrcp.c:4097 unimrcp_log: Destroy TCP 
Connection 192.168.22.148:38906 <-> 192.168.22.230:8000
  == Spawn extension (default, 8800, 3) exited non-zero on 'SIP/1002-08decf58'

Voronov Alexander, software team leader
Patrick Ravaldini, software engineer
Speech Technology Center, S-Petersburg, Russia

Original issue reported on code.google.com by voronov....@gmail.com on 15 Jun 2010 at 3:42

GoogleCodeExporter commented 9 years ago
Hi Alexander and Patrick,

The debug output would be required to identify the problem. You could enable it 
from /etc/asterisk/logger.conf

Nonetheless, I suspect that MRCPRecog did play the specified file. Most 
probably, the play was immediately interrupted due to barge-in (START-OF-INPUT 
from the MRCP server). BTW, you could try the same with disabled barge-in 
option (b=0).

Original comment by achalo...@gmail.com on 16 Jun 2010 at 6:37

GoogleCodeExporter commented 9 years ago
The debug output and disabled barge-in option (b=0) logs in attach. disabled 
barge-in don't help us ((

Original comment by PRavald...@gmail.com on 16 Jun 2010 at 9:22

Attachments:

GoogleCodeExporter commented 9 years ago
Another quest:
We have:
2. File data/sound/palmira3 Format PCM 16bit, mono, frequency=8000, size 133240 
bytes

But in Asterisk output we see another file lenght: 
[Jun 15 19:28:17] NOTICE[5251]: app_unimrcp.c:5028 app_recog_exec: file 
length:66598

it looks like: 66598 = (133240-44(header of wav file))/2(one channel???, but we 
also have mono...) We can't understand - what's the matter with it...

Original comment by PRavald...@gmail.com on 16 Jun 2010 at 9:29

GoogleCodeExporter commented 9 years ago
What if you try to play one of the standard messages, for instance 
f=demo-thanks.

Also, you may need to attach that palmira3 file too.

Original comment by achalo...@gmail.com on 16 Jun 2010 at 10:35

GoogleCodeExporter commented 9 years ago
We try file "demo-thanks" and have the same result. Just file lenght now is 
38720. Also we have played both files (demo-thanks and palmira3) with 
"Playback" function of dialplan and have success...

Original comment by PRavald...@gmail.com on 16 Jun 2010 at 12:14

Attachments:

GoogleCodeExporter commented 9 years ago
I have used the attached palmira3.wav without an issue. So, the problem is 
definitely not in the message itself. I started to suspect it's a codec related 
issue. Try to use the same codec on both legs: incoming SIP leg and SIP/MRCPv2 
leg. Make a network capture on the Asterisk box and attach it to review.

Original comment by achalo...@gmail.com on 16 Jun 2010 at 6:12

GoogleCodeExporter commented 9 years ago
I think, that problem is in my vmware Ubuntu. Another machine works correctly.
Ok. This bug may be closed in all ;-) Thank you!

Original comment by PRavald...@gmail.com on 17 Jun 2010 at 5:38

GoogleCodeExporter commented 9 years ago
All's well that ends well :)

Original comment by achalo...@gmail.com on 17 Jun 2010 at 6:14

GoogleCodeExporter commented 9 years ago
Hi folk,

I am getting below error while i run MRCPRecog, i want to recognize the speech,
why it is trying to generate another call to extension '127.0.0.1:5060' ?????

anyone have any idea????

    -- Executing [1234@outbound:1] Answer("SIP/901-00000001", "") in new stack
    -- Executing [1234@outbound:2] Wait("SIP/901-00000001", "2") in new stack
    -- Executing [1234@outbound:3] MRCPRecog("SIP/901-00000001", "/usr/local/unimrcp/conf/client-profiles/nuance.xml,") in new stack
[Aug 24 19:36:01] NOTICE[22350]: app_unimrcp.c:4921 app_recog_exec: Grammar to 
recognize with: /usr/local/unimrcp/conf/client-profiles/nuance.xml
[Aug 24 19:36:01] NOTICE[22350]: app_unimrcp.c:5002 app_recog_exec: DTMF 
enable: 0
[Aug 24 19:36:01] NOTICE[22350]: app_unimrcp.c:4169 unimrcp_log: Create MRCP 
Handle 0x88019448 [speech-nuance5-mrcp2]
[Aug 24 19:36:01] NOTICE[22291]: app_unimrcp.c:4169 unimrcp_log: Add Control 
Channel 0x7fdd88019448 <new@speechrecog>
[Aug 24 19:36:01] NOTICE[22295]: app_unimrcp.c:4169 unimrcp_log: SIP Call State 
0x7fdd88019448 [calling]
  == Using SIP RTP CoS mark 5
[Aug 24 19:36:01] WARNING[22303]: chan_sip.c:8338 process_sdp: Unsupported SDP 
media 
type in offer: application 9 TCP/MRCPv2 1
[Aug 24 19:36:01] NOTICE[22303]: chan_sip.c:20152 handle_request_invite: Call 
from '' to extension '127.0.0.1:5060' rejected because extension not found in 
context 'default'.
[Aug 24 19:36:01] NOTICE[22295]: app_unimrcp.c:4169 unimrcp_log: SIP Call State 
0x7fdd88019448 [terminated]
[Aug 24 19:36:01] ERROR[22291]: app_unimrcp.c:2420 speech_on_channel_add: 
(ASR-0) RECOGNIZER channel error!
[Aug 24 19:36:01] NOTICE[22291]: app_unimrcp.c:4169 unimrcp_log: Destroy MRCP 
Handle 0x7fdd88019448
[Aug 24 19:36:01] NOTICE[22350]: app_unimrcp.c:2041 speech_channel_destroy: 
(ASR-0) Audio queue destroyed
    -- Executing [1234@outbound:4] Verbose("SIP/901-00000001", "") in new stack
    -- Executing [1234@outbound:5] Hangup("SIP/901-00000001", "") in new stack

Original comment by az...@staff.mondotalk.com on 24 Aug 2012 at 5:41