Menu

PocketSphinx on c

Help
2016-04-09
2016-04-10
  • ElMokhtar Ahmed

    ElMokhtar Ahmed - 2016-04-09

    Hi,
    I have successfully installed pocketsphinx pre alpha .. but i want to integrate it into a c++ application, i followed this tutorial http://cmusphinx.sourceforge.net/wiki/tutorialpocketsphinx but i am looking for decoding a live audio input for my application, i understand that i've to run continuous.c but an error occurs "/usr/local/include/sphinxbase/ad.h:44:27: fatal error: sphinx_config.h: No such file or directory
    include <sphinx_config.h>" and the file sphinx_config.h is puted in place</sphinx_config.h>

     

    Last edit: ElMokhtar Ahmed 2016-04-09
  • ElMokhtar Ahmed

    ElMokhtar Ahmed - 2016-04-10

    i solved the previous error, but sadly i have a new one
    i think it's a recording problem

    INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='current', VARNORM='no', AGC='none'
    INFO: cmn.c(143): mean[0]= 12.00, mean[1..12]= 0.0
    INFO: acmod.c(164): Using subvector specification 0-12/13-25/26-38
    INFO: mdef.c(518): Reading model definition: /home/ahmozz/Documents/C_Programming/pocketsphinx-5prealpha/include/pocket.example/language/en-fr-ptm/mdef
    INFO: bin_mdef.c(181): Allocating 101051 * 8 bytes (789 KiB) for CD tree
    INFO: tmat.c(206): Reading HMM transition probability matrices: /home/ahmozz/Documents/C_Programming/pocketsphinx-5prealpha/include/pocket.example/language/en-fr-ptm/transition_matrices
    INFO: acmod.c(117): Attempting to use PTM computation module
    INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /home/ahmozz/Documents/C_Programming/pocketsphinx-5prealpha/include/pocket.example/language/en-fr-ptm/means
    INFO: ms_gauden.c(292): 36 codebook, 3 feature, size: 
    INFO: ms_gauden.c(294):  128x13
    INFO: ms_gauden.c(294):  128x13
    INFO: ms_gauden.c(294):  128x13
    INFO: ms_gauden.c(198): Reading mixture gaussian parameter: /home/ahmozz/Documents/C_Programming/pocketsphinx-5prealpha/include/pocket.example/language/en-fr-ptm/variances
    INFO: ms_gauden.c(292): 36 codebook, 3 feature, size: 
    INFO: ms_gauden.c(294):  128x13
    INFO: ms_gauden.c(294):  128x13
    INFO: ms_gauden.c(294):  128x13
    INFO: ms_gauden.c(354): 65 variance values floored
    INFO: ptm_mgau.c(476): Loading senones from dump file /home/ahmozz/Documents/C_Programming/pocketsphinx-5prealpha/include/pocket.example/language/en-fr-ptm/sendump
    INFO: ptm_mgau.c(500): BEGIN FILE FORMAT DESCRIPTION
    INFO: ptm_mgau.c(563): Rows: 128, Columns: 2108
    INFO: ptm_mgau.c(595): Using memory-mapped I/O for senones
    INFO: ptm_mgau.c(835): Maximum top-N: 4
    INFO: phone_loop_search.c(114): State beam -225 Phone exit beam -225 Insertion penalty 0
    INFO: dict.c(320): Allocating 4171 * 32 bytes (130 KiB) for word entries
    INFO: dict.c(333): Reading main dictionary: /home/ahmozz/Documents/C_Programming/pocketsphinx-5prealpha/include/pocket.example/language/cmudict-en-fr.dict
    INFO: dict.c(213): Allocated 0 KiB for strings, 0 KiB for phones
    INFO: dict.c(336): 72 words read
    INFO: dict.c(358): Reading filler dictionary: /home/ahmozz/Documents/C_Programming/pocketsphinx-5prealpha/include/pocket.example/language/en-fr-ptm/noisedict
    INFO: dict.c(213): Allocated 0 KiB for strings, 0 KiB for phones
    INFO: dict.c(361): 3 words read
    INFO: dict2pid.c(396): Building PID tables for dictionary
    INFO: dict2pid.c(406): Allocating 36^3 * 2 bytes (91 KiB) for word-initial triphones
    INFO: dict2pid.c(132): Allocated 31392 bytes (30 KiB) for word-final triphones
    INFO: dict2pid.c(196): Allocated 31392 bytes (30 KiB) for single-phone word triphones
    INFO: ngram_model_trie.c(456): Trying to read LM in trie binary format
    INFO: ngram_model_trie.c(467): Header doesn't match
    INFO: ngram_model_trie.c(189): Trying to read LM in arpa format
    INFO: ngram_model_trie.c(205): LM of order 3
    INFO: ngram_model_trie.c(207): #1-grams: 38
    INFO: ngram_model_trie.c(207): #2-grams: 80
    INFO: ngram_model_trie.c(207): #3-grams: 125
    INFO: lm_trie.c(399): Training quantizer
    INFO: lm_trie.c(407): Building LM trie
    INFO: ngram_search_fwdtree.c(99): 31 unique initial diphones
    INFO: ngram_search_fwdtree.c(148): 0 root, 0 non-root channels, 6 single-phone words
    INFO: ngram_search_fwdtree.c(186): Creating search tree
    INFO: ngram_search_fwdtree.c(192): before: 0 root, 0 non-root channels, 6 single-phone words
    INFO: ngram_search_fwdtree.c(326): after: max nonroot chan increased to 222
    INFO: ngram_search_fwdtree.c(339): after: 28 root, 94 non-root channels, 5 single-phone words
    INFO: ngram_search_fwdflat.c(157): fwdflat: min_ef_width = 4, max_sf_win = 25
    Error opening audio device sysdefault for capture: No such entity
    Segmentation fault (core dumped)
    

    the problem is with this line ad = ad_open_dev("sysdefault", (int) cmd_ln_float32_r(config, "-samprate"));

    what can i do please ?

     

    Last edit: ElMokhtar Ahmed 2016-04-10

Log in to post a comment.