####Test for the "speechrecog" resource #### #### LOGFILE repeatYesNo2125-001.log SIPSEND { INVITE sip:mresources@$session.sipServer() SIP/2.0 Via: SIP/2.0/$session.transportType() $session.hostSipClient():$session.portSipClient();branch=$session.branch() Max-Forwards: 6 To: MediaServer From: client_user ;tag=$session.fromTag() Contact: Call-ID: $session.getCallId() CSeq: $session.getCSeq() INVITE Content-Type: application/sdp Content-Length: $msg.contentLength() v=0 o=client_user 2890844526 2890842808 IN IP4 $session.hostSipClient() s=SomeSIPsession m=application 9 $session.mrcpTransport()/MRCPv2 c=IN IP4 $session.hostMediaClient() a=setup:active a=connection:new a=resource:speechrecog a=cmid:1 m=audio $session.getFreeRtpPort() RTP/AVP 0 96 c=IN IP4 $session.hostMediaClient() a=rtpmap:0 pcmu/8000 a=rtpmap:8 pcma/8000 a=rtpmap:96 l16/8000 a=sendonly a=mid:1 } WAIT SIPACKSEND # input file is 11.55 sec long so with default Recognition-Timeout=10000 # the recognition will fail like this # Jan 25 14:46:41.38|TUCPU=0|TKCPU=15|TID=17572|0|6000|WaitForCmd::execute|msg\=MRCP/2.0 125 RECOGNITION-COMPLETE 101 COMPLETE@#Channel-Identifier: 2@speechrecog@#Completion-Cause: 015 no-match-maxtime@#@# # # To fix set Recognition-Timeout=15000 MRCPSEND { MRCP/2.0 $msg.length() RECOGNIZE 101 Cancel-If-Queue: false Channel-Identifier: $session.channelIdentifier("speechrecog", "1") Content-Type: text/uri-list No-Input-Timeout: 20000 Recognition-Timeout: 22000 Start-Input-Timers: false Content-Length: $msg.contentLength() Speech-Language: th-TH Confidence-Threshold: 0 Speech-complete-Timeout: 0 Speech-Incomplete-Timeout: 3000 #http://192.168.38.208:90/grammars/aia/citizen/23oct/citizen-id.gram http://192.168.38.208:90/toyota/repeatYesNo2125.gram } WAIT AUDIOSEND 1 $opt.rtcpBye() NUAN-26.wav WAITFOR 2 "COMPLETE" 30000 STOPAUDIOSEND 1 SIPBYESEND WAIT # END OF THE SCRIPT