Menu

integrate asterisk with pocketsphinx

Help
Muneer
2012-04-04
2012-09-22
  • Muneer

    Muneer - 2012-04-04

    we integrate asterisk with pocket sphinx
    when tested using using xlite soft-phone http://download.cnet.com/X-Lite/300
    0-2349_4-10547103.html

    it give excellent result
    but when i tried to connect via my Samsung galaxy s1 using
    sipdroid https://play.google.com/store/apps/details?id=org.sipdroid.sipua

    i got this error
    full log in asterisk :

    WARNING: pbx.c:1344 pbx_exec: The application delimiter is now the comma,
    not the pipe. Did you forget to convert your dialplan? (AGI(say.pl |'Welcome
    to the Sphinx and Asterisk integration test.'))
    WARNING: res_agi.c:885 launch_script: Failed to execute '/var/lib/asterisk
    /agi-bin/say.pl |'Welcome to the Sphinx and Asterisk integration test.'': File
    does not exist.
    -- Executing SpeechActivateGrammar("SIP/6003-00000001", "ar.DMP") in new stack
    -- Executing AGI("SIP/6003-00000001", "say.pl|'Please say yes or
    no.'|1|yornprompt") in new stack
    WARNING: pbx.c:1344 pbx_exec: The application delimiter is now the comma, not
    the pipe. Did you forget to convert your dialplan? (AGI(say.pl|'Please say yes
    or no.'|1|yornprompt))
    WARNING: res_agi.c:885 launch_script: Failed to execute '/var/lib/asterisk
    /agi-bin/say.pl|'Please say yes or no.'|1|yornprompt': File does not exist.
    -- Executing SpeechStart("SIP/6003-00000001", "") in new stack
    -- Executing SpeechBackground("SIP/6003-00000001", "/tmp/yornprompt|10") in
    new stack
    WARNING: pbx.c:1344 pbx_exec: The application delimiter is now the comma, not
    the pipe. Did you forget to convert your dialplan?
    (SpeechBackground(/tmp/yornprompt|10))
    WARNING: file.c:650 ast_openstream_full: File /tmp/yornprompt|10 does not
    exist in any format
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    NOTICE: res_speech_sphinx.c:302 sphinx_sread: Score: 0 Result: 'لَّا'
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    NOTICE: res_speech_sphinx.c:302 sphinx_sread: Score: 0 Result: 'لَّا'
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    NOTICE: res_speech_sphinx.c:302 sphinx_sread: Score: 0 Result: 'لَّا'
    WARNING: dsp.c:1282 ast_dsp_silence: Can't calculate silence on a non-voice
    frame
    NOTICE: res_speech_sphinx.c:302 sphinx_sread: Score: 0 Result: 'لَّا'

    "Can't calculate silence on a non-voice frame" when search on this word its
    appear its a frame time where is the configuration to this time

    this is Arabic word 'لَّا'

    and the full log in astsphinx

    ./astsphinx 10069 arg.txt ar.lm

    INFO: cmd_ln.c(691): Parsing command line:
    \
    -hmm /home/hiyassat/tutorial/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k/ \
    -dict dict \
    -lm yesno \
    -samprate 8000 \
    -frate 50 \
    -silprob 0.005 \
    -bestpath yes

    Current configuration:

    -agc none none
    -agcthresh 2.0 2.000000e+00
    -alpha 0.97 9.700000e-01
    -ascale 20.0 2.000000e+01
    -aw 1 1
    -backtrace no no
    -beam 1e-48 1.000000e-48
    -bestpath yes yes
    -bestpathlw 9.5 9.500000e+00
    -bghist no no
    -ceplen 13 13
    -cmn current current
    -cmninit 8.0 8.0
    -compallsen no no
    -debug 0
    -dict dict
    -dictcase no no
    -dither no no
    -doublebw no no
    -ds 1 1
    -fdict
    -feat 1s_c_d_dd 1s_c_d_dd
    -featparams
    -fillprob 1e-8 1.000000e-08
    -frate 100 50
    -fsg
    -fsgusealtpron yes yes
    -fsgusefiller yes yes
    -fwdflat yes yes
    -fwdflatbeam 1e-64 1.000000e-64
    -fwdflatefwid 4 4
    -fwdflatlw 8.5 8.500000e+00
    -fwdflatsfwin 25 25
    -fwdflatwbeam 7e-29 7.000000e-29
    -fwdtree yes yes
    -hmm /home/hiyassat/tutorial/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k/
    -input_endian little little
    -jsgf
    -kdmaxbbi -1 -1
    -kdmaxdepth 0 0
    -kdtree
    -latsize 5000 5000
    -lda
    -ldadim 0 0
    -lextreedump 0 0
    -lifter 0 0
    -lm yesno
    -lmctl
    -lmname default default
    -logbase 1.0001 1.000100e+00
    -logfn
    -logspec no no
    -lowerf 133.33334 1.333333e+02
    -lpbeam 1e-40 1.000000e-40
    -lponlybeam 7e-29 7.000000e-29
    -lw 6.5 6.500000e+00
    -maxhmmpf -1 -1
    -maxnewoov 20 20
    -maxwpf -1 -1
    -mdef
    -mean
    -mfclogdir
    -min_endfr 0 0
    -mixw
    -mixwfloor 0.0000001 1.000000e-07
    -mllr
    -mmap yes yes
    -ncep 13 13
    -nfft 512 512
    -nfilt 40 40
    -nwpen 1.0 1.000000e+00
    -pbeam 1e-48 1.000000e-48
    -pip 1.0 1.000000e+00
    -pl_beam 1e-10 1.000000e-10
    -pl_pbeam 1e-5 1.000000e-05
    -pl_window 0 0
    -rawlogdir
    -remove_dc no no
    -round_filters yes yes
    -samprate 16000 8.000000e+03
    -seed -1 -1
    -sendump
    -senlogdir
    -senmgau
    -silprob 0.005 5.000000e-03
    -smoothspec no no
    -svspec
    -tmat
    -tmatfloor 0.0001 1.000000e-04
    -topn 4 4
    -topn_beam 0 0
    -toprule
    -transform legacy legacy
    -unit_area yes yes
    -upperf 6855.4976 6.855498e+03
    -usewdphones no no
    -uw 1.0 1.000000e+00
    -var
    -varfloor 0.0001 1.000000e-04
    -varnorm no no
    -verbose no no
    -warp_params
    -warp_type inverse_linear inverse_linear
    -wbeam 7e-29 7.000000e-29
    -wip 0.65 6.500000e-01
    -wlen 0.025625 2.562500e-02

    INFO: cmd_ln.c(691): Parsing command line:
    \
    -nfilt 31 \
    -lowerf 200 \
    -upperf 3500 \
    -wlen 0.0256 \
    -feat s2_4x \
    -agc none \
    -cmn current \
    -varnorm no \
    -alpha 0.97 \
    -doublebw no \
    -transform legacy \
    -ncep 13 \
    -nfft 512

    Current configuration:

    -agc none none
    -agcthresh 2.0 2.000000e+00
    -alpha 0.97 9.700000e-01
    -ceplen 13 13
    -cmn current current
    -cmninit 8.0 8.0
    -dither no no
    -doublebw no no
    -feat 1s_c_d_dd s2_4x
    -frate 100 50
    -input_endian little little
    -lda
    -ldadim 0 0
    -lifter 0 0
    -logspec no no
    -lowerf 133.33334 2.000000e+02
    -ncep 13 13
    -nfft 512 512
    -nfilt 40 31
    -remove_dc no no
    -round_filters yes yes
    -samprate 16000 8.000000e+03
    -seed -1 -1
    -smoothspec no no
    -svspec
    -transform legacy legacy
    -unit_area yes yes
    -upperf 6855.4976 3.500000e+03
    -varnorm no no
    -verbose no no
    -warp_params
    -warp_type inverse_linear inverse_linear
    -wlen 0.025625 2.560000e-02

    INFO: acmod.c(242): Parsed model-specific feature parameters from /home/hiyass
    at/tutorial/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k//feat.params
    INFO: feat.c(684): Initializing feature stream to type: 's2_4x', ceplen=13,
    CMN='current', VARNORM='no', AGC='none'
    INFO: cmn.c(142): mean= 12.00, mean= 0.0
    INFO: mdef.c(520): Reading model definition:
    /home/hiyassat/tutorial/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k//mdef
    INFO: bin_mdef.c(173): Allocating 17583 * 8 bytes (137 KiB) for CD tree
    INFO: tmat.c(205): Reading HMM transition probability matrices: /home/hiyassat
    /tutorial/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k//transition_matrices
    INFO: acmod.c(117): Attempting to use SCHMM computation module
    INFO: ms_gauden.c(198): Reading mixture gaussian parameter:
    /home/hiyassat/tutorial/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k//means
    INFO: ms_gauden.c(292): 1 codebook, 4 feature, size:
    INFO: ms_gauden.c(294): 256x12
    INFO: ms_gauden.c(294): 256x24
    INFO: ms_gauden.c(294): 256x3
    INFO: ms_gauden.c(294): 256x12
    INFO: ms_gauden.c(198): Reading mixture gaussian parameter:
    /home/hiyassat/tutorial/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k//variances
    INFO: ms_gauden.c(292): 1 codebook, 4 feature, size:
    INFO: ms_gauden.c(294): 256x12
    INFO: ms_gauden.c(294): 256x24
    INFO: ms_gauden.c(294): 256x3
    INFO: ms_gauden.c(294): 256x12
    INFO: ms_gauden.c(354): 144 variance values floored
    INFO: s2_semi_mgau.c(908): Loading senones from dump file
    /home/hiyassat/tutorial/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k//sendump
    INFO: s2_semi_mgau.c(932): BEGIN FILE FORMAT DESCRIPTION
    INFO: s2_semi_mgau.c(995): Rows: 256, Columns: 1150
    INFO: s2_semi_mgau.c(1027): Using memory-mapped I/O for senones
    INFO: s2_semi_mgau.c(1304): Maximum top-N: 4 Top-N beams: 0 0 0 0
    INFO: dict.c(306): Allocating 6003 * 20 bytes (117 KiB) for word entries
    INFO: dict.c(321): Reading main dictionary: dict
    INFO: dict.c(212): Allocated 34 KiB for strings, 29 KiB for phones
    INFO: dict.c(324): 1904 words read
    INFO: dict.c(330): Reading filler dictionary:
    /home/hiyassat/tutorial/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k//noisedict
    INFO: dict.c(212): Allocated 0 KiB for strings, 0 KiB for phones
    INFO: dict.c(333): 3 words read
    INFO: dict2pid.c(396): Building PID tables for dictionary
    INFO: dict2pid.c(404): Allocating 50^3 * 2 bytes (244 KiB) for word-initial
    triphones
    INFO: dict2pid.c(131): Allocated 30200 bytes (29 KiB) for word-final triphones
    INFO: dict2pid.c(195): Allocated 30200 bytes (29 KiB) for single-phone word
    triphones
    INFO: ngram_model_arpa.c(477): ngrams 1=1430, 2=2411, 3=3011
    INFO: ngram_model_arpa.c(135): Reading unigrams
    INFO: ngram_model_arpa.c(516): 1430 = #unigrams created
    INFO: ngram_model_arpa.c(195): Reading bigrams
    INFO: ngram_model_arpa.c(533): 2411 = #bigrams created
    INFO: ngram_model_arpa.c(534): 80 = #prob2 entries
    INFO: ngram_model_arpa.c(542): 122 = #bo_wt2 entries
    INFO: ngram_model_arpa.c(292): Reading trigrams
    INFO: ngram_model_arpa.c(555): 3011 = #trigrams created
    INFO: ngram_model_arpa.c(556): 55 = #prob3 entries
    INFO: ngram_search_fwdtree.c(99): 150 unique initial diphones
    INFO: ngram_search_fwdtree.c(147): 0 root, 0 non-root channels, 5 single-phone
    words
    INFO: ngram_search_fwdtree.c(186): Creating search tree
    INFO: ngram_search_fwdtree.c(191): before: 0 root, 0 non-root channels, 5
    single-phone words
    INFO: ngram_search_fwdtree.c(326): after: max nonroot chan increased to 6986
    INFO: ngram_search_fwdtree.c(338): after: 147 root, 6858 non-root channels, 4
    single-phone words
    INFO: ngram_search_fwdflat.c(156): fwdflat: min_ef_width = 4, max_sf_win = 25
    INFO: ngram_model_arpa.c(477): ngrams 1=1430, 2=2411, 3=3011
    INFO: ngram_model_arpa.c(135): Reading unigrams
    INFO: ngram_model_arpa.c(516): 1430 = #unigrams created
    INFO: ngram_model_arpa.c(195): Reading bigrams
    INFO: ngram_model_arpa.c(533): 2411 = #bigrams created
    INFO: ngram_model_arpa.c(534): 80 = #prob2 entries
    INFO: ngram_model_arpa.c(542): 122 = #bo_wt2 entries
    INFO: ngram_model_arpa.c(292): Reading trigrams
    INFO: ngram_model_arpa.c(555): 3011 = #trigrams created
    INFO: ngram_model_arpa.c(556): 55 = #prob3 entries
    INFO: ngram_search_fwdtree.c(99): 150 unique initial diphones
    INFO: ngram_search_fwdtree.c(147): 0 root, 0 non-root channels, 5 single-phone
    words
    INFO: ngram_search_fwdtree.c(186): Creating search tree
    INFO: ngram_search_fwdtree.c(191): before: 0 root, 0 non-root channels, 5
    single-phone words
    INFO: ngram_search_fwdtree.c(338): after: 147 root, 6858 non-root channels, 4
    single-phone words

    any help is appreciated

     
  • Nickolay V. Shmyrev

    It gives you warnings in the log which you need to understand and fix

    [Apr 4 00:30:53] WARNING[31982]: pbx.c:1344 pbx_exec: The application delimiter is now the comma, not the pipe. Did you forget to convert your dialplan? (AGI(say.pl|'Please say yes or no.'|1|yornprompt)) [Apr 4 00:30:53] WARNING[31982]: res_agi.c:885 launch_script: Failed to execute '/var/lib/asterisk/agi-bin/say.pl|'Please say yes or no.'|1|yornprompt': File does not exist.
    
     
  • hiyassat

    hiyassat - 2012-04-12

    Thanks Nickolay
    we use asterisk-unimrcp

    this my dial paln

    exten => 5554,1,Answer()
    exten => 5554,2,SpeechCreate()
    exten => 5554,3,SpeechLoadGrammar(digit,/usr/local/unimrcp/data/gramma$
    exten => 5554,4,SpeechActivateGrammar(digit)
    exten => 5554,5,SpeechBackground(hello-world,20)
    exten => 5554,6,GotoIf($?7:9)
    exten => 5554,7,Playback(vm-nonumber)
    exten => 5554,8,Goto(5)
    exten => 5554,9,Verbose(1,The recognized input is ${SPEECH_TEXT(0)})
    exten => 5554,10,Verbose(1,The score is ${SPEECH_SCORE(0)})
    exten => 5554,11,Verbose(1,The matched grammar is ${SPEECH_GRAMMAR(0)})
    exten => 5554,12,SpeechDeactivateGrammar(digit)
    exten => 5554,13,SpeechUnloadGrammar(digit)
    exten => 5554,14,SpeechDestroy()
    exten => 5554,15,Hangup()
    when i call from sip to 5554
    i got this error

    == Using SIP RTP CoS mark 5
    -- Executing Answer("SIP/6006-00000000", "") in new stack
    -- Executing SpeechCreate("SIP/6006-00000000", "") in new stack
    NOTICE: app_unimrcp.c:4169 unimrcp_log: Create MRCP Handle 0x8770988
    NOTICE: app_unimrcp.c:4169 unimrcp_log: Add Control Channel 0x8770988
    new@speechrecog
    ip-118-139-163-102*CLI>
    all xml can be found her
    any help

     
  • Nickolay V. Shmyrev

    exten => 5554,3,SpeechLoadGrammar(digit,/usr/local/unimrcp/data/gramma$

    This line is not correct, don't you think so?

     
  • Muneer

    Muneer - 2012-04-15

    sorry nshmyrev
    but error in copying line this line is correct

    exten => 5554,3,SpeechLoadGrammar(digit,/usr/local/unimrcp/data/grammar.xml)

    any help ?

     
  • Muneer

    Muneer - 2012-04-19

    hi Nickolay

    now i got this error
    when we call from ZOIPER
    the log of this asterisk is :

    [quote]
    
    == Using SIP RTP CoS mark 5
        -- Executing [5554@DLPN_DialPlan1:1] Answer("SIP/6007-00000034", "") in new stack
        -- Executing [5554@DLPN_DialPlan1:2] MRCPRecog("SIP/6007-00000034", "/home/hiyassat/tutorial/pocketsphinx/model/lm/en_US/an4.txt.lm,p=default&i=none&f=demo-c&t=5000&b=2&sl=en-US") in new stack
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4805 app_recog_exec: Option=|p=default|
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4805 app_recog_exec: Option=|i=none|
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4805 app_recog_exec: Option=|f=demo-c|
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4805 app_recog_exec: Option=|t=5000|
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4805 app_recog_exec: Option=|b=2|
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4805 app_recog_exec: Option=|sl=en-US|
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4918 app_recog_exec: Profile to use: default
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4921 app_recog_exec: Grammar to recognize with: /home/hiyassat/tutorial/pocketsphinx/model/lm/en_US/an4.txt.lm
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4924 app_recog_exec: Filename to play: demo-c
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4927 app_recog_exec: Recognition timeout: 5000
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4930 app_recog_exec: Barge-in: 2
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4936 app_recog_exec: Sensitivity-level: en-US
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:5002 app_recog_exec: DTMF enable: 2
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:4169 unimrcp_log: Create MRCP Handle 0x9a91058 [speech-nuance5-mrcp2]
    [Apr 19 05:31:23] NOTICE[7494]: app_unimrcp.c:4169 unimrcp_log: Add Control Channel 0x9a91058 <new@speechrecog>
    [Apr 19 05:31:23] NOTICE[7498]: app_unimrcp.c:4169 unimrcp_log: SIP Call State 0x9a91058 [calling]
    [Apr 19 05:31:23] NOTICE[7498]: app_unimrcp.c:4169 unimrcp_log: SIP Call State 0x9a91058 [ready]
    [Apr 19 05:31:23] NOTICE[7495]: app_unimrcp.c:4169 unimrcp_log: Established TCP/MRCPv2 Connection 118.139.163.102:38190 <-> 118.139.163.102:1544
    [Apr 19 05:31:23] NOTICE[7494]: app_unimrcp.c:2387 speech_on_channel_add: (ASR-45) DTMF generator created
    [Apr 19 05:31:23] ERROR[7299]: app_unimrcp.c:5128 app_recog_exec: Unable to load grammar
    [Apr 19 05:31:23] NOTICE[7498]: app_unimrcp.c:4169 unimrcp_log: SIP Call State 0x9a91058 [terminated]
    [Apr 19 05:31:23] NOTICE[7494]: app_unimrcp.c:4169 unimrcp_log: Destroy TCP/MRCPv2 Connection 118.139.163.102:38190 <-> 118.139.163.102:1544
    [Apr 19 05:31:23] NOTICE[7494]: app_unimrcp.c:2351 speech_on_session_terminate: (ASR-45) DTMF generator destroyed
    [Apr 19 05:31:23] NOTICE[7494]: app_unimrcp.c:4169 unimrcp_log: Destroy MRCP Handle 0x9a91058
    [Apr 19 05:31:23] NOTICE[7299]: app_unimrcp.c:2041 speech_channel_destroy: (ASR-45) Audio queue destroyed
        -- Executing [5554@DLPN_DialPlan1:3] Verbose("SIP/6007-00000034", "1,The recognized input is ") in new stack
     The recognized input is 
        -- Executing [5554@DLPN_DialPlan1:4] Hangup("SIP/6007-00000034", "") in new stack
      == Spawn extension (DLPN_DialPlan1, 5554, 4) exited non-zero on 'SIP/6007-00000034'
    [/quote]
    

    and the log of ./unimrcpserver is :

    [quote]
    
    2012-04-19 05:31:23:703027 [INFO]   Receive SIP Event [nua_i_state] Status 200 OK
    2012-04-19 05:31:23:703050 [NOTICE] SIP Call State 0x942c210 [completed]
    2012-04-19 05:31:23:703772 [INFO]   Receive SIP Event [nua_i_ack] Status 200 OK
    2012-04-19 05:31:23:703797 [INFO]   Receive SIP Event [nua_i_state] Status 200 OK
    2012-04-19 05:31:23:703808 [NOTICE] SIP Call State 0x942c210 [ready]
    2012-04-19 05:31:23:703817 [INFO]   Receive SIP Event [nua_i_active] Status 200 Call active
    2012-04-19 05:31:23:704075 [NOTICE] Accepted TCP/MRCPv2 Connection 118.139.163.102:1544 <-> 118.139.163.102:38190
    2012-04-19 05:31:23:708981 [INFO]   Receive MRCPv2 Stream 118.139.163.102:1544 <-> 118.139.163.102:38190 [221 bytes]
    MRCP/2.0 221 DEFINE-GRAMMAR 1
    Channel-Identifier: de115f7cc6044d5e@speechrecog
    Content-Type: application/srgs+xml
    Content-Id: ASR-45
    Content-Length: 62
    
    /home/hiyassat/tutorial/pocketsphinx/model/lm/en_US/an4.txt.lm
    2012-04-19 05:31:23:709040 [INFO]   Attach Control Channel <de115f7cc6044d5e@speechrecog> to Connection 118.139.163.102:1544 <-> 118.139.163.102:38190 [1]
    2012-04-19 05:31:23:709069 [INFO]   Process DEFINE-GRAMMAR Request <de115f7cc6044d5e@speechrecog> [1]
    2012-04-19 05:31:23:709098 [INFO]   Dispatch Request DEFINE-GRAMMAR <de115f7cc6044d5e@pocketsphinx>
    2012-04-19 05:31:23:709127 [WARN]  [b] Not Supported Content-Type [application/srgs+xml] [/b]<de115f7cc6044d5e@pocketsphinx>
    2012-04-19 05:31:23:709150 [INFO]   Process DEFINE-GRAMMAR Response <de115f7cc6044d5e@speechrecog> [1]
    2012-04-19 05:31:23:709180 [INFO]   Send MRCPv2 Stream 118.139.163.102:1544 <-> 118.139.163.102:38190 [112 bytes]
    MRCP/2.0 112 1 409 COMPLETE
    Channel-Identifier: de115f7cc6044d5e@speechrecog
    Completion-Cause: 000 success
    
    2012-04-19 05:31:23:709513 [INFO]   TCP/MRCPv2 Peer Disconnected 118.139.163.102:1544 <-> 118.139.163.102:38190
    2012-04-19 05:31:23:709937 [INFO]   Receive SIP Event [nua_i_bye] Status 200 Session Terminated
    2012-04-19 05:31:23:709960 [INFO]   Receive SIP Event [nua_i_state] Status 200 Session Terminated
    2012-04-19 05:31:23:709972 [NOTICE] SIP Call State 0x942c210 [terminated]
    2012-04-19 05:31:23:709985 [INFO]   Receive SIP Event [nua_i_terminated] Status 200 Session Terminated
    2012-04-19 05:31:23:710003 [INFO]   Deactivate Session 0x942c210 <de115f7cc6044d5e>
    2012-04-19 05:31:23:710013 [INFO]   Terminate Session 0x942c210 <de115f7cc6044d5e>
    2012-04-19 05:31:23:710027 [INFO]   Close Channel <de115f7cc6044d5e@pocketsphinx>
    2012-04-19 05:31:23:710040 [NOTICE] Remove Session <de115f7cc6044d5e>
    2012-04-19 05:31:23:710057 [INFO]   Remove Control Channel <de115f7cc6044d5e@speechrecog> [0]
    2012-04-19 05:31:23:712385 [INFO]   Close RTP Receiver 118.139.163.102:5008 <- 118.139.163.102:4090 [r:0 l:0 j:0 d:0 i:0]
    2012-04-19 05:31:23:712439 [INFO]   Remove RTP Session 118.139.163.102:5008
    2012-04-19 05:31:23:712451 [INFO]   Generate RTCP RR [ssrc:0 last_seq:0 j:0 lost:0 frac:0]
    2012-04-19 05:31:23:712476 [INFO]   Send Compound RTCP Packet [BYE] [84 bytes] 118.139.163.102:5009 -> 118.139.163.102:4091
    2012-04-19 05:31:23:712528 [NOTICE] Destroy TCP/MRCPv2 Connection 118.139.163.102:1544 <-> 118.139.163.102:38190
    2012-04-19 05:31:23:712547 [INFO]   Session Terminated 0x942c210 <de115f7cc6044d5e>
    2012-04-19 05:31:23:712593 [NOTICE] Destroy Session <de115f7cc6044d5e>
    
     
  • Nickolay V. Shmyrev

    Unimrcp server logs describes the reason of the failure

    2012-04-19 05:31:23:709127 Not Supported Content-Type
    de115f7cc6044d5e@pocketsphinx

    You need to submit grammar in jsgf format.

     
  • Acker

    Acker - 2012-05-30

    hello nsh
    we solve all problem and the unimrcp give us good result .

    bu there is a small problem when hangup the unimrcpserver give an error

    glibc detected /usr/sbin/asterisk: double free or
    corruption (out): 0x000000001fddd2a0 ***
    ======= Backtrace: =========
    /lib64/libc.so.6
    /lib64/libc.so.6(cfree+0x4b)
    /lib64/libpthread.so.0
    /lib64/libpthread.so.0
    /lib64/libc.so.6(clone+0x6d)
    ======= Memory map: ========
    ....

     
  • Acker

    Acker - 2012-05-30

    and this is my configuration

    thanks for your help :)

    unimrcpserver.xml

    <?xml version="1.0" encoding="UTF-8"?>

    <unimrcpserver xmlns:xsi="&lt;a class=" "="" href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-klzzwxh:0287instance" xsi:noNamespaceSchemaLocation="unimrcpserver.xsd" version="1.0">
    <properties>

    <ip>118.139.163.102</ip>

    </properties>

    <components>

    <resource-factory>
    <resource id="speechsynth" enable="false"/>
    <resource id="speechrecog" enable="true"/>
    <resource id="recorder" enable="false"/>
    </resource-factory>

    <sip-uas id="SIP-Agent-1" type="SofiaSIP">



    <sip-port>8070</sip-port>
    <sip-transport>udp,tcp</sip-transport>

    <ua-name>UniMRCP SofiaSIP</ua-name>
    <sdp-origin>UniMRCPServer</sdp-origin>




    </sip-uas>

    <mrcpv2-uas id="MRCPv2-Agent-1">


    <mrcp-port>1544</mrcp-port>
    <max-connection-count>100</max-connection-count>
    <force-new-connection>true</force-new-connection>
    <rx-buffer-size>2048</rx-buffer-size>
    <tx-buffer-size>2048</tx-buffer-size>
    </mrcpv2-uas>

    <media-engine id="Media-Engine-1">
    <realtime-rate>1</realtime-rate>
    </media-engine>

    <rtp-factory id="RTP-Factory-1">



    <rtp-port-min>5000</rtp-port-min>
    <rtp-port-max>6000</rtp-port-max>
    </rtp-factory>

    <plugin-factory>
    <engine id="Cepstral-Swift-1" name="mrcpcepstral" enable="false"/>
    <engine id="PocketSphinx-1" name="mrcppocketsphinx" enable="true"/>
    <engine id="Flite-1" name="mrcpflite" enable="false"/>
    <engine id="Demo-Synth-1" name="demosynth" enable="false"/>
    <engine id="Demo-Recog-1" name="demorecog" enable="true"/>
    <engine id="Recorder-1" name="mrcprecorder" enable="true"/>

    </plugin-factory>
    </components>

    <settings>

    <rtp-settings id="RTP-Settings-1">
    <jitter-buffer>
    <playout-delay>50</playout-delay>
    <max-playout-delay>200</max-playout-delay>
    </jitter-buffer>
    <ptime>20</ptime>

    <codecs own-preference="true">GSM PCMU PCMA L16/96/64000 PCMU/97/64000
    PCMA/98/16000 L16/99/64000 </codecs>

    <rtcp enable="true">

    <rtcp-bye>2</rtcp-bye>

    <tx-interval>5000</tx-interval>

    <rx-resolution>1000</rx-resolution>
    </rtcp>
    </rtp-settings>
    </settings>

    <profiles>

    <mrcpv2-profile id="uni2">
    <sip-uas>SIP-Agent-1</sip-uas>
    <mrcpv2-uas>MRCPv2-Agent-1</mrcpv2-uas>
    <media-engine>Media-Engine-1</media-engine>
    <rtp-factory>RTP-Factory-1</rtp-factory>
    <rtp-settings>RTP-Settings-1</rtp-settings>

    <resource-engine-map>

    <param name="speechrecog" value="PocketSphinx-1"/>
    </resource-engine-map>

    </mrcpv2-profile>

    </profiles>
    </unimrcpserver>

    mrcp.conf

    default-asr-profile = speech-nuance5-mrcp2
    default-tts-profile = speech-nuance5-mrcp2
    ; UniMRCP logging level to appear in Asterisk logs. Options are:
    ; EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG -->
    log-level = DEBUG
    max-connection-count = 100
    offer-new-connection = 1
    ; rx-buffer-size = 1024
    ; tx-buffer-size = 1024
    ; request-timeout = 60

    ; +++ MRCP settings +++
    version = 1
    ;
    ; +++ RTSP +++
    ; === RSTP settings ===
    server-ip = 118.139.163.102
    server-port = 8070
    ; force-destination = 1
    resource-location = media
    speechsynth = speechsynthesizer
    speechrecog = speechrecognizer
    ;
    ; +++ RTP +++
    ; === RTP factory ===
    ; rtp-ip = 0.0.0.0
    rtp-ip = 118.139.163.102
    ; rtp-ext-ip = auto
    rtp-port-min = 4000
    rtp-port-max = 5000
    ; === RTP settings ===
    ; --- Jitter buffer settings ---
    playout-delay = 50
    ; min-playout-delay = 20
    max-playout-delay = 200
    ; --- RTP settings ---
    ptime = 20
    codecs = PCMU PCMA L16/96/8000
    ; --- RTCP settings ---
    rtcp = 1
    rtcp-bye = 2
    rtcp-tx-interval = 5000
    rtcp-rx-resolution = 1000

    ; +++ MRCP settings +++
    version = 2
    ;
    ; +++ SIP +++
    ; === SIP settings ===
    server-ip = 118.139.163.102
    server-port = 8070
    ; server-username = test
    force-destination = 1
    ; === SIP agent ===
    ; client-ip = 0.0.0.0
    client-ip = 118.139.163.102
    ; client-ext-ip = auto
    client-port = 5093
    sip-transport = udp
    ; ua-name = Asterisk
    ; sdp-origin = Asterisk
    ;
    ; +++ RTP +++
    ; === RTP factory ===
    ; rtp-ip = 0.0.0.0
    rtp-ip = 118.139.163.102
    ; rtp-ext-ip = auto
    rtp-port-min = 4000
    rtp-port-max = 5000
    ; === RTP settings ===
    ; --- Jitter buffer settings ---
    playout-delay = 50
    ; min-playout-delay = 20
    max-playout-delay = 200
    ; --- RTP settings ---
    ptime = 20
    codecs = PCMU PCMA L16/96/8000
    ; --- RTCP settings ---
    rtcp = 1
    rtcp-bye = 2
    rtcp-tx-interval = 5000
    rtcp-rx-resolution = 1000

    pocketsphinx.xml

    <?xml version="1.0" encoding="UTF-8"?>

    <pocketsphinx>

    <sensitivity level="1" activity-timeout="300" inactivity-timeout="304"/>

    <timers noinput-timeout="10000" recognition-timeout="15"/>

    <model dir="/home/hiyassat/tutorial/pocketsphinx/model/hmm/ar_hafiz/an4.cd_sem i_1000/" narrowband="/home/hiyassat/tutorial/pocketsphinx/model/hmm/ar_hafiz/a n4.cd_semi_1000/" wideband="wsj1" dictionary="/home/hiyassat/tutorial/pocketsphinx/model/lm/ar_hafiz/an4.dic" preferred="narrowband"/>

    <save-waveform dir="/home/hiyassat/online_project/record" enable="1"/>
    </pocketsphinx>

     
  • Nickolay V. Shmyrev

    glibc detected /usr/sbin/asterisk: double free or corruption (out):
    0x000000001fddd2a0

    This message means there is a bug in the application. It might be a bug in
    asterisk or in other modules. You need to collect stacktrace to provide more
    information for developer. Without stacktrace it's hard to resolve this issue.

    You need to contact developers about this issue, it's not CMUSphinx problem.
    Hopefully you will not report any BSOD you meet here.

     
  • moemen

    moemen - 2017-02-07

    hello everyone , i'm beginner in asterisk and speech recognition and i want to make a project in university about IVR with speech recognition , well i learned a lot of doumentation and i have installed asterisk but i have a problem while i'm installing asterisk-unimrcp , i have asterisk 14.2.1 and unimrcp 1.4.0
    and this is the error :

    root@moemen-HP-15-Notebook-PC:/home/moemen/Téléchargements/asterisk-unimrcp-1.3.0# make
    Making all in res-speech-unimrcp
    make[1] : on entre dans le répertoire « /home/moemen/Téléchargements/asterisk-unimrcp-1.3.0/res-speech-unimrcp »
    CC res_speech_unimrcp.lo
    In file included from ../include/ast_compat_defs.h:30:0,
    from res_speech_unimrcp.c:28:
    /usr/include/asterisk.h:300:2: error: #error "Externally compiled modules must declare AST_MODULE_SELF_SYM."
    #error "Externally compiled modules must declare AST_MODULE_SELF_SYM."
    ^
    res_speech_unimrcp.c:31:23: error: expected declaration specifiers or ‘...’ before string constant
    ASTERISK_FILE_VERSION(FILE, "$Revision: $")
    ^
    res_speech_unimrcp.c:31:33: error: expected declaration specifiers or ‘...’ before string constant
    ASTERISK_FILE_VERSION(FILE, "$Revision: $")
    ^
    Makefile:444 : la recette pour la cible « res_speech_unimrcp.lo » a échouée
    make[1]: [res_speech_unimrcp.lo] Erreur 1
    make[1] : on quitte le répertoire « /home/moemen/Téléchargements/asterisk-unimrcp-1.3.0/res-speech-unimrcp »
    Makefile:422 : la recette pour la cible « all-recursive » a échouée
    make:
    [all-recursive] Erreur 1

     
    • Nickolay V. Shmyrev

      Those are pretty self-explaining messages not really related to pocketsphinx.

      The module is not compatible with asterisk version. You need to try older asterisk version or you can fix the module yourself. Usually it is not hard to add missing defines.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.