andrenatal / unimrcp

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

Empty results on Generic speech recognition API - Asterisk & Pocketsphinx #133

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Asterisk 1.4.2
2. Pocketsphinx 0.7
3. uni-ast-package 0.3.2

I was following instruction on 
http://code.google.com/p/unimrcp/wiki/asteriskUniMRCP

I've got things working and it's recognizing my speech. But the following 
asterisk function like all returned empty while the unimrcpserver log is 
showing recognized digits

Asterisk Dialplan =============================
[asr-test]
exten => s,1,Answer()
exten => s,n,SpeechCreate()
exten => s,n,SpeechLoadGrammar(digit,/usr/local/unimrcp/data/grammar.jsgf)
exten => s,n,SpeechActivateGrammar(digit)
exten => s,n,SpeechStart()
exten => s,n,SpeechBackground(tt-monkeys,20)
exten => s,n,NoOp(${SPEECH(results))
exten => s,n,GotoIf($["${SPEECH(status)}" = "0"]?play:go)
exten => s,n(play),Playback(vm-nonumber)
exten => s,n,Goto(5)
exten => s,n(go),Verbose(1,The recognized input is ${SPEECH_TEXT(0)})
exten => s,n,Verbose(1,The score is ${SPEECH_SCORE(0)})
exten => s,n,Verbose(1,The matched grammar is ${SPEECH_GRAMMAR(0)})
exten => s,n,SpeechDeactivateGrammar(digit)
exten => s,n,SpeechUnloadGrammar(digit)
exten => s,n,SpeechDestroy()
exten => s,n,Hangup()

Asterisk Log ================
    -- Registered SIP '101' at 192.168.1.1 port 1098 expires 600
    -- Saved useragent "Jitsi1.0-beta1-nightly.build.3651Linux" for peer 101
    -- Executing [s@asr-test:1] Answer("SIP/101-08264148", "") in new stack
    -- Executing [s@asr-test:2] SpeechCreate("SIP/101-08264148", "") in new stack
    -- Executing [s@asr-test:3] SpeechLoadGrammar("SIP/101-08264148", "digit|/usr/local/unimrcp/data/grammar.jsgf") in new stack
    -- Executing [s@asr-test:4] SpeechActivateGrammar("SIP/101-08264148", "digit") in new stack
    -- Executing [s@asr-test:5] SpeechStart("SIP/101-08264148", "") in new stack
    -- Executing [s@asr-test:6] SpeechBackground("SIP/101-08264148", "tt-monkeys|20") in new stack
    -- Executing [s@asr-test:7] NoOp("SIP/101-08264148", "0") in new stack
    -- Executing [s@asr-test:8] GotoIf("SIP/101-08264148", "0?play:go") in new stack
    -- Goto (asr-test,s,11)
    -- Executing [s@asr-test:11] Verbose("SIP/101-08264148", "1|The recognized input is ") in new stack
 The recognized input is 
    -- Executing [s@asr-test:12] Verbose("SIP/101-08264148", "1|The score is ") in new stack
 The score is 
    -- Executing [s@asr-test:13] Verbose("SIP/101-08264148", "1|The matched grammar is ") in new stack
 The matched grammar is 
    -- Executing [s@asr-test:14] SpeechDeactivateGrammar("SIP/101-08264148", "digit") in new stack
    -- Executing [s@asr-test:15] SpeechUnloadGrammar("SIP/101-08264148", "digit") in new stack
    -- Executing [s@asr-test:16] SpeechDestroy("SIP/101-08264148", "") in new stack
    -- Executing [s@asr-test:17] Hangup("SIP/101-08264148", "") in new stack
  == Spawn extension (asr-test, s, 17) exited non-zero on 'SIP/101-08264148'

unimrcpserver Log ============================================
2011-10-13 23:59:08:179610 [INFO]   Detected Voice Activity 
<a576866f3303451e@pocketsphinx>
2011-10-13 23:59:08:179646 [INFO]   Process START-OF-INPUT Event 
<a576866f3303451e@speechrecog> [3]
2011-10-13 23:59:08:179670 [INFO]   Send MRCPv2 Stream 127.0.0.1:1544 <-> 
127.0.0.1:53534 [94 bytes]
MRCP/2.0 94 START-OF-INPUT 3 IN-PROGRESS
Channel-Identifier: a576866f3303451e@speechrecog

2011-10-13 23:59:08:279527 [INFO]   Get Recognition Partial Result [three] 
Score [-2643] <a576866f3303451e@pocketsphinx>
2011-10-13 23:59:08:589624 [INFO]   Detected Voice Inactivity 
<a576866f3303451e@pocketsphinx>
INFO: cmn_prior.c(121): cmn_prior_update: from <  8.00  0.00  0.00  0.00  0.00  
0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00 >
INFO: cmn_prior.c(139): cmn_prior_update: to   <  4.77  0.03 -0.13 -0.16 -0.20 
-0.08 -0.01 -0.12 -0.11 -0.07 -0.11 -0.01 -0.04 >
INFO: fsg_search.c(1030): 126 frames, 1702 HMMs (13/fr), 4266 senones (33/fr), 
966 history entries (7/fr)

INFO: fsg_search.c(1407): Start node two.0:6:9
INFO: fsg_search.c(1407): Start node <sil>.0:2:98
INFO: fsg_search.c(1446): End node <sil>.116:118:125 (-454)
INFO: fsg_search.c(1446): End node three.87:101:125 (-659)
INFO: fsg_search.c(1662): lattice start node <s>.0 end node </s>.126
INFO: ps_lattice.c(1352): Normalizer P(O) = alpha(</s>:126:126) = -146277
INFO: ps_lattice.c(1390): Joint P(O,S) = -146277 P(S|O) = 0
2011-10-13 23:59:08:590955 [INFO]   Get Recognition Final Result [three] Prob 
[0] Score [-2857] <a576866f3303451e@pocketsphinx>
2011-10-13 23:59:08:590972 [INFO]   Process RECOGNITION-COMPLETE Event 
<a576866f3303451e@speechrecog> [3]
2011-10-13 23:59:08:590977 [INFO]   State Transition RECOGNIZING -> RECOGNIZED 
<a576866f3303451e@speechrecog>
2011-10-13 23:59:08:590998 [INFO]   Send MRCPv2 Stream 127.0.0.1:1544 <-> 
127.0.0.1:53534 [352 bytes]
MRCP/2.0 352 RECOGNITION-COMPLETE 3 COMPLETE
Channel-Identifier: a576866f3303451e@speechrecog
Completion-Cause: 000 success
Content-Type: application/x-nlsml
Content-Length: 167

<?xml version="1.0"?>
<result grammar="digit">
  <interpretation grammar="digit" confidence="99">
    <input mode="speech">three</input>
  </interpretation>
</result>

2011-10-13 23:59:08:610996 [INFO]   Receive MRCPv2 Stream 127.0.0.1:1544 <-> 
127.0.0.1:53534 [102 bytes]
MRCP/2.0 102 DEFINE-GRAMMAR 4
Channel-Identifier: a576866f3303451e@speechrecog
Content-Id: digit

2011-10-13 23:59:08:611020 [INFO]   Process DEFINE-GRAMMAR Request 
<a576866f3303451e@speechrecog> [4]
2011-10-13 23:59:08:611025 [INFO]   State Transition RECOGNIZED -> IDLE 
<a576866f3303451e@speechrecog>
2011-10-13 23:59:08:611032 [INFO]   Dispatch Request DEFINE-GRAMMAR 
<a576866f3303451e@pocketsphinx>
2011-10-13 23:59:08:611037 [INFO]   Remove Grammar File 
[../data/a576866f3303451e-digit.gram] <a576866f3303451e@pocketsphinx>
2011-10-13 23:59:08:611095 [INFO]   Process DEFINE-GRAMMAR Response 
<a576866f3303451e@speechrecog> [4]
2011-10-13 23:59:08:611107 [INFO]   Send MRCPv2 Stream 127.0.0.1:1544 <-> 
127.0.0.1:53534 [112 bytes]
MRCP/2.0 112 4 200 COMPLETE
Channel-Identifier: a576866f3303451e@speechrecog
Completion-Cause: 000 success

2011-10-13 23:59:08:611737 [INFO]   TCP/MRCPv2 Peer Disconnected 127.0.0.1:1544 
<-> 127.0.0.1:53534
2011-10-13 23:59:08:611825 [INFO]   Receive SIP Event [nua_i_bye] Status 200 
Session Terminated
2011-10-13 23:59:08:611832 [INFO]   Receive SIP Event [nua_i_state] Status 200 
Session Terminated
2011-10-13 23:59:08:611837 [NOTICE] SIP Call State 0x806eaf8 [terminated]
2011-10-13 23:59:08:611842 [INFO]   Receive SIP Event [nua_i_terminated] Status 
200 Session Terminated
2011-10-13 23:59:08:611848 [INFO]   Deactivate Session 0x806eaf8 
<a576866f3303451e>
2011-10-13 23:59:08:611852 [INFO]   Terminate Session 0x806eaf8 
<a576866f3303451e>
2011-10-13 23:59:08:611861 [INFO]   Remove Control Channel 
<a576866f3303451e@speechrecog> [0]
2011-10-13 23:59:08:611875 [INFO]   Close Channel 
<a576866f3303451e@pocketsphinx>
2011-10-13 23:59:08:611882 [NOTICE] Remove Session <a576866f3303451e>
2011-10-13 23:59:08:611888 [INFO]   Free Decoder <a576866f3303451e@pocketsphinx>
2011-10-13 23:59:08:619825 [INFO]   Close RTP Receiver 127.0.0.1:5000 <- 
127.0.0.1:4000 [r:126 l:0 j:67 d:0 i:0]
2011-10-13 23:59:08:619915 [INFO]   Remove RTP Session 127.0.0.1:5000
2011-10-13 23:59:08:624029 [NOTICE] Destroy TCP/MRCPv2 Connection 
127.0.0.1:1544 <-> 127.0.0.1:53534
2011-10-13 23:59:08:624179 [INFO]   Session Terminated 0x806eaf8 
<a576866f3303451e>
2011-10-13 23:59:08:624255 [NOTICE] Destroy Session <a576866f3303451e>

Original issue reported on code.google.com by red.rain...@gmail.com on 13 Oct 2011 at 4:20

GoogleCodeExporter commented 9 years ago
I'm having the same problem.  Does anyone have a suggestion to resolve this?

Original comment by justin.g...@gmail.com on 18 Feb 2012 at 1:49

GoogleCodeExporter commented 9 years ago
I was able to resolve my issue by using UNIMRCP and ASTERISK-UNIMRCP from the 
head in the SVN repository.

Original comment by justin.g...@gmail.com on 18 Feb 2012 at 4:28

GoogleCodeExporter commented 9 years ago
Fixed in trunk. The fix will be available with the new release.

Original comment by achalo...@gmail.com on 6 Mar 2013 at 2:47