Speech Recognition Engines

Flat
Sphinx again and again
User: royerfa
Date: 3/17/2008 4:54 am
Views: 13336
Rating: 27
Hello, 
 
I try to use the tuto for Sphinx 3 using the WIKI, 
 
http://sphinx.subwiki.com/sphinx/index.php/Hello_World_Decoder_QuickStart_Guide 
 
I am using Ubuntu. 
 
 
 
Following the instruction I have an error in the sep 8 RUN 
 
Do you know the problem and can you help me to solve it ? 
 
royerfa@royerfa-laptop:/usr/src/sphinx/record$ sphinx3_livepretend ctlfile . cfgfile 
INFO: info.c(65): Host: 'royerfa-laptop' 
INFO: info.c(66): Directory: '/usr/src/sphinx/record' 
INFO: info.c(70): sphinx3_livepretend Compiled on: Mar 10 2008, AT: 13:46:00 
 
INFO: cmd_ln.c(430): Parsing command line: 

-samprate 16000 \ 
-hmm $SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd \ 
-dict $SPHINX_ROOT/lm_giga_5k_nvp_3gram/lm_giga_5k_nvp.sphinx.dic \ 
-fdict $SPHINX_ROOT/lm_giga_5k_nvp_3gram/lm_giga_5k_nvp.sphinx.filler \ 
-lm $SPHINX_ROOT/lm_giga_5k_nvp_3gram/lm_giga_5k_nvp_3gram.arpa.DMP  
 
Current configuration: 
[NAME] [DEFLT] [VALUE] 
-agc none none 
-alpha 0.97 9.700000e-01 
-backtrace yes yes 
-beam 1.0e-55 1.000000e-55 
-bestpath no no 
-bestpathlw 0.000000e+00 
-bestscoredir 
-bestsenscrdir 
-bghist no no 
-bptbldir 
-bptblsize 32768 32768 
-cb2mllr .1cls. .1cls. 
-cep2spec no no 
-ceplen 13 13 
-ci_pbeam 1e-80 1.000000e-80 
-cmn current current 
-cond_ds no no 
-ctl 
-ctlcount 1000000000 1000000000 
-ctloffset 0 0 
-ctl_lm 
-ctl_mllr 
-dagfudge 2 2 
-dict $SPHINX_ROOT/lm_giga_5k_nvp_3gram/lm_giga_5k_nvp.sphinx.dic 
-dist_ds no no 
-dither no no 
-doublebw no no 
-ds 1 1 
-epl 3 3 
-fbtype mel_scale mel_scale 
-fdict $SPHINX_ROOT/lm_giga_5k_nvp_3gram/lm_giga_5k_nvp.sphinx.filler 
-feat 1s_c_d_dd 1s_c_d_dd 
-fillpen 
-fillprob 0.1 1.000000e-01 
-frate 100 100 
-fsg 
-fsgusealtpron yes yes 
-fsgusefiller yes yes 
-gs 
-gs4gs yes yes 
-hmm $SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd 
-hmmdump no no 
-hmmdumpef 200000000 200000000 
-hmmdumpsf 200000000 200000000 
-hmmhistbinsize 5000 5000 
-hyp 
-hypseg 
-hypsegscore_unscale yes yes 
-inlatdir 
-inlatwin 50 50 
-input_endian little little 
-kdmaxbbi -1 -1 
-kdmaxdepth 0 0 
-kdtree 
-latcompress yes yes 
-latext lat.gz lat.gz 
-lda 
-ldadim 29 29 
-lextreedump 0 0 
-lifter 0 0 
-lm $SPHINX_ROOT/lm_giga_5k_nvp_3gram/lm_giga_5k_nvp_3gram.arpa.DMP 
-lmctlfn 
-lmdumpdir 
-lminmemory no no 
-lmname 
-log3table yes yes 
-logbase 1.0003 1.000300e+00 
-logspec no no 
-lowerf 133.33334 1.333333e+02 
-lts_mismatch no no 
-lw 9.5 9.500000e+00 
-machine_endian little little 
-maxcdsenpf 100000 100000 
-maxedge 2000000 2000000 
-maxhistpf 100 100 
-maxhmmpf 20000 20000 
-maxhyplen 1000 1000 
-maxlmop 100000000 100000000 
-maxlpf 40000 40000 
-maxppath 1000000 1000000 
-maxwpf 20 20 
-mdef 
-mean 
-min_endfr 3 3 
-mixw 
-mixwfloor 0.0000001 1.000000e-07 
-mllr 
-mode fwdtree fwdtree 
-nbest 200 200 
-nbestdir 
-nbestext nbest.gz nbest.gz 
-ncep 13 13 
-nfft 512 512 
-nfilt 40 40 
-Nlextree 3 3 
-Nstalextree 25 25 
-op_mode -1 -1 
-outlatdir 
-outlatfmt s3 s3 
-pbeam 1.0e-50 1.000000e-50 
-pheurtype 0 0 
-phonepen 1.0 1.000000e+00 
-phypdump yes yes 
-pl_beam 1.0e-80 1.000000e-80 
-pl_window 1 1 
-ppathdebug no no 
-ptranskip 0 0 
-rawext .raw .raw 
-remove_dc no no 
-round_filters yes yes 
-samprate 16000.0 1.600000e+04 
-seed -1 -1 
-senmgau .cont. .cont. 
-silprob 0.1 1.000000e-01 
-smoothspec no no 
-spec2cep no no 
-subvq 
-subvqbeam 3.0e-3 3.000000e-03 
-svq4svq no no 
-tighten_factor 0.5 5.000000e-01 
-tmat 
-tmatfloor 0.0001 1.000000e-04 
-topn 4 4 
-tracewhmm 
-transform legacy legacy 
-treeugprob yes yes 
-unit_area yes yes 
-upperf 6855.4976 6.855498e+03 
-uw 0.7 7.000000e-01 
-var 
-varfloor 0.0001 1.000000e-04 
-varnorm no no 
-verbose no no 
-vqeval 3 3 
-warp_params 
-warp_type inverse_linear inverse_linear 
-wbeam 1.0e-35 1.000000e-35 
-wend_beam 1.0e-80 1.000000e-80 
-wip 0.7 7.000000e-01 
-wlen 0.025625 2.562500e-02 
-worddumpef 200000000 200000000 
-worddumpsf 200000000 200000000 
 
INFO: kbcore.c(404): Begin Initialization of Core Models: 
INFO: cmd_ln.c(563): Cannot open configuration file $SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd/feat.params for reading 
INFO: logs3.c(151): Initializing logbase: 1.000300e+00 (add table: 1) 
INFO: Initialization of the log add table 
INFO: Log-Add table size = 29350 
INFO: 
INFO: feat.c(835): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='current', VARNORM='no', AGC='none' 
INFO: cmn.c(142): mean[0]= 12.00, mean[1..12]= 0.0 
INFO: kbcore.c(446): .cont. 
INFO: Initialization of feat_t, report: 
INFO: Feature type = 1s_c_d_dd 
INFO: Cepstral size = 13 
INFO: Cepstral size Used = 13 
INFO: Number of stream = 1 
INFO: Vector size of stream[0]: 39 
INFO: Whether CMN is used = 1 
INFO: Whether AGC is used = 0 
INFO: Whether variance is normalized = 0 
INFO: 
INFO: Reading HMM in Sphinx 3 Model format 
INFO: Model Definition File: $SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd/mdef 
INFO: Mean File: $SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd/means 
INFO: Variance File: $SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd/variances 
INFO: Mixture Weight File: $SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd/mixture_weights 
INFO: Transition Matrices File: $SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd/transition_matrices 
INFO: mdef.c(679): Reading model definition: $SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd/mdef 
SYSTEM_ERROR: "mdef.c", line 684: fopen($SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd/mdef,r) failed 
; No such file or directory 
royerfa@royerfa-laptop:/usr/src/sphinx/record$  
 
 
What is the file feat.params ??? 
and why is he missing ?? 
 
Thanks 
regards

--- (Edited on 3/17/2008 4:54 am [GMT-0500] by royerfa) ---

Re: Sphinx again and again
User: nsh
Date: 3/17/2008 6:56 am
Views: 257
Rating: 23

The reason of your troubles is not missing feat.params (it's an optional file which is missing for hub4) but a missing mdef file as you can see while reading the log carefully:

 SYSTEM_ERROR: "mdef.c", line 684: fopen($SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd/mdef,r) failed 

; No such file or directory

You should just point correct file path in command args. Most probably you forgot to replace $SPHINX_ROOT by location of the hub4 model.

--- (Edited on 3/17/2008 6:56 am [GMT-0500] by nsh) ---

Re: Sphinx again and again
User: royerfa
Date: 3/17/2008 7:21 am
Views: 261
Rating: 21

just have a look, the file exist, so what is the problem !! 

INFO: mdef.c(679): Reading model definition: $SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd/mdef
SYSTEM_ERROR: "mdef.c", line 684: fopen($SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd/mdef,r) failed
; No such file or directory
royerfa@royerfa-laptop:/usr/src/sphinx/record$ cd $SPHINX_ROOT/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd/
royerfa@royerfa-laptop:/usr/src/sphinx/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd$ ls -l
total 33624
-rw-r--r-- 1 royerfa royerfa 4562251 2008-03-14 13:50 8gau.6000sen.quant
-rw-r--r-- 1 royerfa royerfa   15305 2008-03-14 16:05 Makefile
-rw-r--r-- 1 royerfa royerfa     123 2008-03-14 13:50 Makefile.am
-rw-r--r-- 1 royerfa royerfa   10037 2008-03-14 16:04 Makefile.in
-rw-r--r-- 1 royerfa royerfa 6811138 2008-03-14 14:59 mdef
-rw-r--r-- 1 royerfa royerfa 6811137 2008-03-14 13:50 mdef~
-rw-r--r-- 1 royerfa royerfa 7667774 2008-03-14 13:50 means
-rw-r--r-- 1 royerfa royerfa  196666 2008-03-14 13:50 mixture_weights
-rw-r--r-- 1 royerfa royerfa   14895 2008-03-14 13:50 mllr_matrices
-rw-r--r-- 1 royerfa royerfa      74 2008-03-14 13:50 test-align-mllr.out
-rw-r--r-- 1 royerfa royerfa     222 2008-03-14 13:50 test.align.mllr.out
-rw-r--r-- 1 royerfa royerfa     276 2008-03-14 13:50 test.align.out
-rw-r--r-- 1 royerfa royerfa     913 2008-03-14 13:50 test.align.phseg
-rw-r--r-- 1 royerfa royerfa     552 2008-03-14 13:50 test.align.wdseg
-rw-r--r-- 1 royerfa royerfa    1081 2008-03-14 13:50 test.allphone.allp
-rw-r--r-- 1 royerfa royerfa     133 2008-03-14 13:50 test.allphone.match
-rw-r--r-- 1 royerfa royerfa     881 2008-03-14 13:50 test.allphone.matchseg
-rw-r--r-- 1 royerfa royerfa    1081 2008-03-14 13:50 test.allphone.mllr.allp
-rw-r--r-- 1 royerfa royerfa     133 2008-03-14 13:50 test.allphone.mllr.match
-rw-r--r-- 1 royerfa royerfa     881 2008-03-14 13:50 test.allphone.mllr.matchseg
-rw-r--r-- 1 royerfa royerfa     623 2008-03-14 13:50 test.allphone.phone_tg.allp
-rw-r--r-- 1 royerfa royerfa      88 2008-03-14 13:50 test.allphone.phone_tg.match
-rw-r--r-- 1 royerfa royerfa     586 2008-03-14 13:50 test.allphone.phone_tg.matchseg
-rw-r--r-- 1 royerfa royerfa     623 2008-03-14 13:50 test.allphone.phone_tg.mllr.allp
-rw-r--r-- 1 royerfa royerfa      89 2008-03-14 13:50 test.allphone.phone_tg.mllr.match
-rw-r--r-- 1 royerfa royerfa     586 2008-03-14 13:50 test.allphone.phone_tg.mllr.matchseg
-rw-r--r-- 1 royerfa royerfa     750 2008-03-14 13:50 test-conf.confhypseg
-rw-r--r-- 1 royerfa royerfa      83 2008-03-14 13:50 test.dp.hyp
-rw-r--r-- 1 royerfa royerfa      83 2008-03-14 13:50 test.dp.ref
-rw-r--r-- 1 royerfa royerfa     862 2008-03-14 13:50 test.dp.simple.log
-rw-r--r-- 1 royerfa royerfa  342948 2008-03-14 13:50 test.mode1369.dump
-rw-r--r-- 1 royerfa royerfa  143316 2008-03-14 13:50 test.subvq
-rw-r--r-- 1 royerfa royerfa    2362 2008-03-14 13:50 transition_matrices
-rw-r--r-- 1 royerfa royerfa 7667774 2008-03-14 13:50 variances
royerfa@royerfa-laptop:/usr/src/sphinx/sphinx3/model/hmm/hub4_cd_continuous_8gau_1s_c_d_dd$

--- (Edited on 3/17/2008 7:21 am [GMT-0500] by royerfa) ---

Re: Sphinx again and again
User: nsh
Date: 3/17/2008 7:50 am
Views: 326
Rating: 27
Again, replace $SPHINX_ROOT with the actual path in argument file.

--- (Edited on 3/17/2008 7:50 am [GMT-0500] by nsh) ---

Re: Sphinx again and again
User: Visitor
Date: 3/17/2008 8:08 am
Views: 267
Rating: 27

Sorry to insist lol

 do I have to put SPHINX_ROOT=/usr/src/sphinx somwehere.

In the console If I type echo $SPHINX_ROOT I cqn see that the patch is added. But I understand that he doesn't find the good location

But can you explain me howto do this.

This is the sample of code . 

   if (!mdeffile)
        E_FATAL("No mdef-file\n");

    if (breport)
        E_INFO("Reading model definition: %s\n", mdeffile);

    m = (mdef_t *) ckd_calloc(1, sizeof(mdef_t));       /* freed in mdef_free */

    if ((fp = fopen(mdeffile, "r")) == NULL)
        E_FATAL_SYSTEM("fopen(%s,r) failed\n", mdeffile);
 

Thank you very much for your patience Cry

--- (Edited on 3/17/2008 8:08 am [GMT-0500] by Visitor) ---

Re: Sphinx again and again
User: nsh
Date: 3/17/2008 10:22 am
Views: 275
Rating: 22

Open file "cfgfile" with the text editor. Replace $SPHINX_ROOT with /usr/local/sphinx or another path where model could be found. Sphinx doesn't expand environment variables in config file, there is no relation with the result you get by echo.

--- (Edited on 3/17/2008 10:22 am [GMT-0500] by nsh) ---

Re: Sphinx again and again
User: Visitor
Date: 3/17/2008 11:54 am
Views: 308
Rating: 26

Embarassed

Thank you, i have made one more small step.

Now I get an other error.

INFO: srch_time_switch_tree.c(261): Lextrees(0), 1 nodes(filler)
INFO: srch_time_switch_tree.c(261): Lextrees(1), 1 nodes(filler)
INFO: srch_time_switch_tree.c(261): Lextrees(2), 1 nodes(filler)
INFO: vithist.c(167): Initializing Viterbi-history module
INFO:   Initialization of srch_t, report:
INFO:   Operation Mode = 4, Operation Name = fwdtree
INFO:
INFO: s3_decode.c(267): Input data will NOT be byte swapped
INFO: s3_decode.c(272): Partial hypothesis WILL be dumped
FATAL_ERROR: "cmd_ln.c", line 906: Unknown argument: -rawext
royerfa@royerfa-laptop:/usr/src/sphinx/record$

How to define this rawext. ??

I just follow the tuto and I got plenty of error, please Help for a newbie.

Embarassed

regards 

--- (Edited on 3/17/2008 11:54 am [GMT-0500] by Visitor) ---

Re: Sphinx again and again
User: royerfa
Date: 3/17/2008 12:00 pm
Views: 332
Rating: 26

Maybe it can be helpful for you to help

 

royerfa@royerfa-laptop:/usr/src/sphinx$ grep -ri rawext .
Binary file ./sphinx3/src/programs/main_livepretend.o matches
./sphinx3/src/programs/main_continuous.c:    sprintf(fullrawfn, "%s/%s%s", rawdirfn, ur->uttfile, decoder.rawext);
./sphinx3/src/programs/.svn/text-base/main_continuous.c.svn-base:    sprintf(fullrawfn, "%s/%s%s", rawdirfn, ur->uttfile, decoder.rawext);
./sphinx3/src/programs/.svn/text-base/main_livepretend.c.svn-base:    sprintf(fullrawfn, "%s/%s%s", rawdirfn, ur->uttfile, decoder.rawext);
Binary file ./sphinx3/src/programs/.libs/sphinx3_livedecode matches
Binary file ./sphinx3/src/programs/.libs/sphinx3_livepretend matches
Binary file ./sphinx3/src/programs/.libs/lt-sphinx3_livepretend matches
Binary file ./sphinx3/src/programs/.libs/sphinx3_continuous matches
Binary file ./sphinx3/src/programs/main_livedecode.o matches
./sphinx3/src/programs/main_livepretend.c:    sprintf(fullrawfn, "%s/%s%s", rawdirfn, ur->uttfile, decoder.rawext);
Binary file ./sphinx3/src/programs/main_continuous.o matches
./sphinx3/src/tests/performance/ti46/.svn/text-base/Makefile.am.svn-base:       echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/ti46/Makefile.am:       echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/ti46/Makefile:  echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/ti46/Makefile.in:       echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/rm1/.svn/text-base/Makefile.am.svn-base:        /bin/echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/rm1/.svn/text-base/Makefile.am.svn-base:        /bin/echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/rm1/Makefile.am:        /bin/echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/rm1/Makefile.am:        /bin/echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/rm1/Makefile:   /bin/echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/rm1/Makefile:   /bin/echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/rm1/Makefile.in:        /bin/echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/rm1/Makefile.in:        /bin/echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/tidigits/.svn/text-base/Makefile.am.svn-base:   echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/tidigits/Makefile.am:   echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/tidigits/Makefile:      echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/performance/tidigits/Makefile.in:   echo "-rawext .wav.raw" >> ARGS.$@
./sphinx3/src/tests/regression/test-livepretend.out:-rawext                     .raw            .raw
./sphinx3/src/tests/regression/test-livepretend-fsg.out:-rawext                 .raw            .raw
./sphinx3/src/tests/regression/test-livepretend-clm.out:-rawext                 .raw            .raw
./sphinx3/src/tests/regression/test-livepretend-mllr.out:-rawext                        .raw            .raw
./sphinx3/src/libs3decoder/libAPI/.svn/text-base/s3_decode.c.svn-base:  "-rawext",
./sphinx3/src/libs3decoder/libAPI/.svn/text-base/s3_decode.c.svn-base:    _decode->rawext = (cmd_ln_str_r(_config, "-rawext"));
Binary file ./sphinx3/src/libs3decoder/libAPI/.libs/libAPI.a matches
Binary file ./sphinx3/src/libs3decoder/libAPI/.libs/s3_decode.o matches
Binary file ./sphinx3/src/libs3decoder/libAPI/s3_decode.o matches
./sphinx3/src/libs3decoder/libAPI/s3_decode.c:  "-rawext",
./sphinx3/src/libs3decoder/libAPI/s3_decode.c:    _decode->rawext = (cmd_ln_str_r(_config, "-rawext"));
Binary file ./sphinx3/src/libs3decoder/.libs/libs3decoder.so.0 matches
Binary file ./sphinx3/src/libs3decoder/.libs/libs3decoder.so.0.0.6 matches
Binary file ./sphinx3/src/libs3decoder/.libs/libs3decoder.so matches
Binary file ./sphinx3/src/libs3decoder/.libs/libs3decoder.a matches
./sphinx3/include/.svn/text-base/s3_decode.h.svn-base:    char* rawext;
./sphinx3/include/s3_decode.h:    char* rawext;

royerfa@royerfa-laptop:/usr/src/sphinx$

So there is a Makefile wich normally will define the rawext but apparently It hasn't be done.

Is it the good direction ??

 

Thank a lot

Cheers 

--- (Edited on 3/17/2008 12:00 pm [GMT-0500] by royerfa) ---

Re: Sphinx again and again
User: nsh
Date: 3/17/2008 1:07 pm
Views: 333
Rating: 28

> I just follow the tuto and I got plenty of error, please Help for a newbie.

I don't see this. There is no even a sign of 'rawext' on the tutorial page. Thus it's hard to understand what are you doing.  :)

--- (Edited on 3/17/2008 1:07 pm [GMT-0500] by nsh) ---

Re: Sphinx again and again
User: Visitor
Date: 3/17/2008 4:28 pm
Views: 218
Rating: 24

Well, I am still doing this commmand.

sphinx3_livepretend ctlfile . cfgfile

and my new error is

FATAL_ERROR: "cmd_ln.c", line 906: Unknown argument: -rawext

--- (Edited on 3/17/2008 4:28 pm [GMT-0500] by Visitor) ---

PreviousNext