Menu

difference in behaviour of s3decode &amp...

Help
2012-05-15
2012-09-22
  • Pranav Jawale

    Pranav Jawale - 2012-05-15

    Hello,

    There are 2 ways to get nbest lists in S3.
    1. Use -nbestdir param with sphinx3_decode
    2. create *lat files with decode, feed them to sphinx3_astar

    I compared the nbest lists created by the above 2 methods and the TOP
    hypothesis in the2 lists matches 99.9% of the time. I'm testing on around 8000
    wav files.

    But, the number of nbest hypotheses is different and the difference is huge
    for many files. Overall, s3_astar gave 34071 less hypotheses in nbest list as
    compared with s3_decode.

    I had kept the beam, wip, lw and min_endfr params same in both the cases. I
    guess the difference is somehow because of implementation in
    src/programs/main_astar.c (used bu s3_astar) and
    src/libs3decoder/libsearch/astar.c
    (used bu s3_decode).

    Is there any reason why one of these methods of creating nbest lists is to be
    preferred over another (which code is 'more correct')?

    Thanks.

     
  • Pranav Jawale

    Pranav Jawale - 2012-05-15

    I should mention that I used

    -mode fwdflat
    

    while using s3_decode

     
  • Nickolay V. Shmyrev

    I've just tried this and both results are identical. Given settings are the
    same the lists have same length. It's not strange because both sphinx3_astar
    and sphinx3_decode call the same function nbest_search. The only difference
    might be in a default parameters.

    Maybe you need to provide more detailed example.

     
  • Pranav Jawale

    Pranav Jawale - 2012-05-22

    Hello!

    Thanks a lot for checking, but I'm still getting different results :(

    I have verified that in the function trace nbest_search() is common for both
    s3_decode and s3_astar (see below)
    Below that I have pasted logs and nbest lists of s3_decode and s3_astar.

    I think the difference is because of the dag structure. The dag can be printed
    in s3_decode with the help of srch_FLAT_FWD_dag_dump(srch, dag) function,
    but can't do so in s3_astar as there is no srch structure available there
    which contains lattice history. If you know of a way the two dags (one in
    s3_decode and another in s3_astar) can be compared, please let me know.

    Should I upload the wav file and other related files for testing?

    s3_astar:
    
    utt_astar()
     -> dag_load(dagfile, cmd_ln_int32_r(config, "-maxedge"), cmd_ln_float32_r(config, "-logbase"), cmd_ln_int32_r(config, "-dagfudge"), dict, fpen, config, logmath)
     -> dag->end->wid = dict->finishwid;
     -> dag_remove_unreachable(dag);
     -> dag_compute_hscr(dag, dict, lmset->cur_lm, 1.0);
     -> dag_remove_bypass_links(dag);
     -> nbest_search(dag, nbestfile, uttid, 1.0, dict, lmset->cur_lm, fpen);
        -> astar_free()
        -> astar_init()
        -> astar_next_ppath()
        -> nbest_hyp_write()
    ------------------------------------------------------------------------    
    s3_decode (with -nbestdir param and -mode fwdflat) (mdef_fillers = y/n has no effect on result)
    
    srch_utt_end()
        -> s->funcs->nbest_impl(s, s->dag);
            -> srch_FLAT_FWD_nbest_impl()
                -> flat_fwd_dag_add_fudge_edges(fwg,dag,cmd_ln_int32_r(kbcore_config(fwg->kbcore), "-dagfudge"),cmd_ln_int32_r(kbcore_config(fwg->kbcore), "-min_endfr"), (void *) fwg->lathist, s->kbc->dict);
                -> dag->end->wid = s->kbc->dict->finishwid;
                -> dag_remove_unreachable(dag);
                -> dag_compute_hscr(dag, kbcore_dict(s->kbc), kbcore_lm(s->kbc), lwf);
                -> dag_remove_bypass_links(dag);
                    -> dag->filler_removed = 0;
                -> nbest_search(dag, str, s->uttid, lwf, kbcore_dict(s->kbc), kbcore_lm(s->kbc), kbcore_fillpen(s->kbc));
                 -> astar_free()
                 -> astar_init()
                 -> astar_next_ppath()
                     -> nbest_hyp_write()
    

    Here is my log for s3_decode

    INFO: info.c(73): c:\Users\rmuser\Desktop\sphinxTutorial\sphinx3\bin\Debug\sphinx3_deco
    
    INFO: cmd_ln.c(512): Parsing command line:
    c:\Users\rmuser\Desktop\sphinxTutorial\sphinx3\bin\Debug\sphinx3_decode.exe \
            -latcompress no \
            -bptbldir E:\users\pranav\sphinx\sphinxtest\test1\nbest \
            -latext lat \
            -nbestext nbest \
            -hmmdump yes \
            -cmn current \
            -phsegdir E:\users\pranav\sphinx\sphinxtest\test1 \
            -bestsenscrdir E:\users\pranav\sphinx\sphinxtest\test1\nbest \
            -mode fwdflat \
            -ctlcount 1 \
            -hmm E:\users\pranav\sphinx\sphinxtest\test1\hmm1 \
            -lm E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.lm \
            -dict E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.dic.txt \
            -fdict E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.filler.txt \
            -hyp E:\users\pranav\sphinx\sphinxtes\test1\VISUALSTUDIOdecode.out.NEW.txt \
            -cepdir E:\users\pranav\sphinx\sphinxtest\test1\feats \
            -cepext .mfc \
            -ctl E:\users\pranav\sphinx\sphinxtest\test1\list_one \
            -nbestdir E:\users\pranav\sphinx\sphinxtest\test1\nbest \
            -outlatdir E:\users\pranav\sphinx\sphinxtest\test1\nbest
    
    Current configuration:
    [NAME]                  [DEFLT]         [VALUE]
    -adchdr                 0               0
    -adcin                  no              no
    -agc                    none            none
    -agcthresh              2.0             2.000000e+000
    -alpha                  0.97            9.700000e-001
    -backtrace              yes             yes
    -beam                   1.0e-55         1.000000e-055
    -bestpath               no              no
    -bestpathlw                             0.000000e+000
    -bestscoredir
    -bestsenscrdir                          E:\users\pranav\sphinx\sphinxtest\test1\nbest
    -bghist                 no              no
    -bgonly                 no              no
    -bptbldir                               E:\users\pranav\sphinx\sphinxtest\test1\nbest
    -bptblsize              32768           32768
    -build_outdirs          yes             yes
    -cb2mllr                .1cls.          .1cls.
    -cepdir                 .               E:\users\pranav\sphinx\sphinxtest\test1\feats
    -cepext                 .mfc            .mfc
    -ceplen                 13              13
    -ci_pbeam               1e-80           1.000000e-080
    -cmn                    current         current
    -cmninit                8.0             8.0
    -cond_ds                no              no
    -ctl                                    E:\users\pranav\sphinx\sphinxtest\test1\list_on
    -ctlcount               1000000000      1
    -ctloffset              0               0
    -ctl_lm
    -ctl_mllr
    -dagfudge               2               2
    -debug                                  0
    -dict                                   E:\users\pranav\sphinx\sphinxtest\test1\lm1\tes
    -dist_ds                no              no
    -dither                 no              no
    -doublebw               no              no
    -ds                     1               1
    -epl                    3               3
    -fdict                                  E:\users\pranav\sphinx\sphinxtest\test1\lm1\tes
    -feat                   1s_c_d_dd       1s_c_d_dd
    -featparams
    -fillpen
    -fillprob               0.1             1.000000e-001
    -frate                  100             100
    -fsg
    -fsgusealtpron          yes             yes
    -fsgusefiller           yes             yes
    -gs
    -gs4gs                  yes             yes
    -hmm                                    E:\users\pranav\sphinx\sphinxtest\test1\hmm1
    -hmmdump                no              yes
    -hmmdumpef              200000000       200000000
    -hmmdumpsf              200000000       200000000
    -hmmhistbinsize         5000            5000
    -hyp                                    E:\users\pranav\sphinx\sphinxtes\test1\VISUALST
    -hypseg
    -hypsegscore_unscale    yes             yes
    -inlatdir
    -inlatwin               50              50
    -input_endian           little          little
    -kdmaxbbi               -1              -1
    -kdmaxdepth             0               0
    -kdtree
    -latcompress            yes             no
    -latext                 lat.gz          lat
    -lda
    -ldadim                 0               0
    -lextreedump            0               0
    -lifter                 0               0
    -lm                                     E:\users\pranav\sphinx\sphinxtest\test1\lm1\tes
    -lmctlfn
    -lmdumpdir
    -lmname
    -log3table              yes             yes
    -logbase                1.0003          1.000300e+000
    -logfn
    -logspec                no              no
    -lowerf                 133.33334       1.333333e+002
    -lts_mismatch           no              no
    -lw                     9.5             9.500000e+000
    -maxcdsenpf             100000          100000
    -maxedge                2000000         2000000
    -maxhistpf              100             100
    -maxhmmpf               20000           20000
    -maxlmop                100000000       100000000
    -maxlpf                 40000           40000
    -maxppath               1000000         1000000
    -maxwpf                 20              20
    -mdef
    -mdef_fillers           no              no
    -mean
    -min_endfr              3               3
    -mixw
    -mixwfloor              0.0000001       1.000000e-007
    -mllr
    -mode                   fwdtree         fwdflat
    -nbest                  200             200
    -nbestdir                               E:\users\pranav\sphinx\sphinxtest\test1\nbest
    -nbestext               nbest.gz        nbest
    -ncep                   13              13
    -nfft                   512             512
    -nfilt                  40              40
    -Nlextree               3               3
    -Nstalextree            25              25
    -op_mode                -1              -1
    -outlatdir                              E:\users\pranav\sphinx\sphinxtest\test1\nbest
    -outlatfmt              s3              s3
    -pbeam                  1.0e-50         1.000000e-050
    -pheurtype              0               0
    -phonepen               1.0             1.000000e+000
    -phsegdir                               E:\users\pranav\sphinx\sphinxtest\test1
    -pl_beam                1.0e-80         1.000000e-080
    -pl_window              1               1
    -ppathdebug             no              no
    -ptranskip              0               0
    -remove_dc              no              no
    -round_filters          yes             yes
    -samprate               16000           1.600000e+004
    -seed                   -1              -1
    -sendump
    -senmgau                .cont.          .cont.
    -silprob                0.1             1.000000e-001
    -smoothspec             no              no
    -subvq
    -subvqbeam              3.0e-3          3.000000e-003
    -svq4svq                no              no
    -svspec
    -tighten_factor         0.5             5.000000e-001
    -tmat
    -tmatfloor              0.0001          1.000000e-004
    -topn                   4               4
    -topn_beam              0               0
    -tracewhmm
    -transform              legacy          legacy
    -treeugprob             yes             yes
    -ugonly                 no              no
    -unit_area              yes             yes
    -upperf                 6855.4976       6.855498e+003
    -utt
    -uw                     0.7             7.000000e-001
    -var
    -varfloor               0.0001          1.000000e-004
    -varnorm                no              no
    -verbose                no              no
    -vqeval                 3               3
    -warp_params
    -warp_type              inverse_linear  inverse_linear
    -wbeam                  1.0e-35         1.000000e-035
    -wend_beam              1.0e-80         1.000000e-080
    -wip                    0.7             7.000000e-001
    -wlen                   0.025625        2.562500e-002
    -worddumpef             200000000       200000000
    -worddumpsf             200000000       200000000
    
    INFO: kbcore.c(442): Begin Initialization of Core Models:
    ERROR: "cmd_ln.c", line 732: Cannot open configuration file E:\users\pranav\sphinx\sphi
    INFO: kbcore.c(462): Parsed model-specific feature parameters from E:\users\pranav\sphi
    INFO:   Initialization of the log add table
    INFO:   Log-Add table size = 29356 x 2 >> 0
    INFO:
    INFO: feat.c(860): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='cu
    INFO: cmn.c(142): mean[0]= 12.00, mean[1..12]= 0.0
    INFO: kbcore.c(489): .cont.
    INFO:   Initialization of feat_t, report:
    INFO:   Feature type         = 1s_c_d_dd
    INFO:   Cepstral size        = 13
    INFO:   Number of streams    = 1
    INFO:   Vector size of stream[0]: 39
    INFO:   Number of subvectors = 0
    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: E:\users\pranav\sphinx\sphinxtest\test1\hmm1/mdef
    INFO:   Mean File: E:\users\pranav\sphinx\sphinxtest\test1\hmm1/means
    INFO:   Variance File: E:\users\pranav\sphinx\sphinxtest\test1\hmm1/variances
    INFO:   Mixture Weight File: E:\users\pranav\sphinx\sphinxtest\test1\hmm1/mixture_weigh
    INFO:   Transition Matrices File: E:\users\pranav\sphinx\sphinxtest\test1\hmm1/transiti
    INFO: mdef.c(683): Reading model definition: E:\users\pranav\sphinx\sphinxtest\test1\hm
    INFO:   Initialization of mdef_t, report:
    INFO:   91 CI-phone, 0 CD-phone, 3 emitstate/phone, 273 CI-sen, 273 Sen, 91 Sen-Seq
    INFO:
    INFO: kbcore.c(299): Using optimized GMM computation for Continuous HMM, -topn will be
    INFO: cont_mgau.c(164): Reading mixture gaussian file 'E:\users\pranav\sphinx\sphinxtes
    INFO: cont_mgau.c(423): 273 mixture Gaussians, 8 components, 1 streams, veclen 39
    INFO: cont_mgau.c(164): Reading mixture gaussian file 'E:\users\pranav\sphinx\sphinxtes
    INFO: cont_mgau.c(423): 273 mixture Gaussians, 8 components, 1 streams, veclen 39
    INFO: cont_mgau.c(524): Reading mixture weights file 'E:\users\pranav\sphinx\sphinxtest
    INFO: cont_mgau.c(679): Read 273 x 8 mixture weights
    INFO: cont_mgau.c(707): Removing uninitialized Gaussian densities
     10 11 26 33 34 52 73 74 248 265 266
    WARNING: "cont_mgau.c", line 781: 182 densities removed (11 mixtures removed entirely)
    INFO: cont_mgau.c(797): Applying variance floor
    INFO: cont_mgau.c(815): 275 variance values floored
    INFO: cont_mgau.c(863): Precomputing Mahalanobis distance invariants
    INFO: tmat.c(169): Reading HMM transition probability matrices: E:\users\pranav\sphinx\
    INFO:   Initialization of tmat_t, report:
    INFO:   Read 91 transition matrices of size 3x4
    INFO:
    INFO: dict.c(385): Reading main dictionary: E:\users\pranav\sphinx\sphinxtest\test1\lm1
    INFO: dict.c(388): 6 words read
    INFO: dict.c(393): Reading filler dictionary: E:\users\pranav\sphinx\sphinxtest\test1\l
    INFO: dict.c(396): 10 words read
    INFO: dict.c(429): Added 0 fillers from mdef file
    INFO:   Initialization of dict_t, report:
    INFO:   No of CI phone: 0
    INFO:   Max word: 4112
    INFO:   No of word: 16
    INFO:
    INFO: lm.c(612): LM read('E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.lm', lw= 9.
    INFO: lm.c(614): Reading LM file E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.lm (
    INFO: lm_3g_dmp.c(472): Bad magic number: 589505315(23232323), not an LM dumpfile??
    INFO: lm.c(622): In lm_read, LM is not a DMP file. Trying to read it as a txt file
    INFO: lm_3g.c(832): Reading LM file E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.l
    INFO: lm_3g.c(849): ngrams 1=7, 2=1, 3=1
    INFO: lm_3g.c(338):        1 = tseg_base entries allocated
    INFO: lm_3g.c(372): Reading unigrams
    INFO: lm_3g.c(919):        7 = #unigrams created
    INFO: lm_3g.c(447): Reading bigrams
    INFO: lm_3g.c(937):        0 = #bigrams created
    INFO: lm_3g.c(938):        1 = #prob2 entries
    INFO: lm_3g.c(945):        1 = #bo_wt2 entries
    INFO: lm_3g.c(572): Reading trigrams
    INFO: lm_3g.c(963):        0 = #trigrams created
    INFO: lm_3g.c(964):        1 = #prob3 entries
    INFO: lm.c(710): The LM routine is operating at 16 bits mode
    INFO:   Initialization of fillpen_t, report:
    INFO:   Language weight =9.500000
    INFO:   Word Insertion Penalty =0.700000
    INFO:   Silence probability =0.100000
    INFO:   Filler probability =0.100000
    INFO:
    INFO: dict2pid.c(600): Building PID tables for dictionary
    INFO:   Initialization of dict2pid_t, report:
    INFO:   Dict2pid is in composite triphone mode
    INFO:   51 composite states; 17 composite sseq
    INFO:
    INFO: kbcore.c(635): Inside kbcore: Verifying models consistency ......
    INFO: kbcore.c(657): End of Initialization of Core Models:
    INFO:   Initialization of beam_t, report:
    INFO:   Parameters used in Beam Pruning of Viterbi Search:
    INFO:   Beam=-422203
    INFO:   PBeam=-383821
    INFO:   WBeam=-268675 (Skip=0)
    INFO:   WEndBeam=-614114
    INFO:   No of CI Phone assumed=91
    INFO:
    INFO:   Initialization of fast_gmm_t, report:
    INFO:   Parameters used in Fast GMM computation:
    INFO:      Frame-level: Down Sampling Ratio 1, Conditional Down Sampling? 0, Distance-b
    INFO:        GMM-level: CI phone beam -614114. MAX CD 100000
    INFO:   Gaussian-level: GS map would be used for Gaussian Selection? =1, SVQ would be u
    INFO:
    INFO:   Initialization of pl_t, report:
    INFO:   Parameters used in phoneme lookahead:
    INFO:   Phoneme look-ahead        type = 0
    INFO:   Phoneme look-ahead beam   size = -614114
    INFO:   No of CI Phones assumed=91
    INFO:
    INFO:   Initialization of ascr_t, report:
    INFO:   No. of CI senone =273
    INFO:   No. of senone = 273
    INFO:   No. of composite senone = 51
    INFO:   No. of senone sequence = 91
    INFO:   No. of composite senone sequence=17
    INFO:   Parameters used in phoneme lookahead:
    INFO:   Phoneme lookahead window = 1
    INFO:
    ERROR: "kb.c", line 172: fopen(E:\users\pranav\sphinx\sphinxtes\test1\VISUALSTUDIOdecod
    INFO: kb.c(308): SEARCH MODE INDEX 3
    INFO: srch.c(376): Search Initialization.
    INFO: srch_flat_fwd.c(205): Initialization
    INFO: ctxt_table.c(256): Building within-word triphones
    INFO: ctxt_table.c(288): 16 within-word triphone instances mapped to CI-phones
    INFO: ctxt_table.c(310): Building cross-word triphones
    INFO: ctxt_table.c(371): 124 cross-word triphones mapped to CI-phones
    INFO:   Initialization of srch_t, report:
    INFO:   Operation Mode = 3, Operation Name = fwdflat
    INFO:
    
    INFO: utt.c(196): Processing: ananas
    INFO: feat.c(1176): At directory E:\users\pranav\sphinx\sphinxtest\test1\feats
    INFO: feat.c(378): Reading mfc file: 'E:\users\pranav\sphinx\sphinxtest\test1\feats/ana
    INFO: cmn.c(175): CMN:  9.76 -0.24 -0.24 -0.16 -0.15 -0.14 -0.12  0.03 -0.30 -0.17 -0.0
    ..........
    INFO: lm.c(969):         0 tg(),         0 tgcache,        0 bo;     0 fills,        0
    INFO: lm.c(973):        0 bg(),        0 bo;     0 fills,        0 in mem (0.0%)
    INFO: srch_flat_fwd.c(93): [H   0.03x ][XH   0.00x][XW   0.03x]
    [mpx 72046][~mpx 1663]
    Backtrace(ananas)
    FV:ananas>                 WORD  SFrm  EFrm AScr(UnNorm)    LMScore  AScr+LScr     ASca
    fv:ananas>              ananasa     3    91       993077     -53781     939296    18960
    FV:ananas>                TOTAL                   993077     -53781
    
    FWDVIT: ananasa (ananas)
    FWDXCT: ananas S 1920234 T 849846 A 865243 L -15397 0 -75263 125 <s> 3 993077 -5536 ana
    
    INFO: srch.c(561): Dumping the Best senone scores.
    INFO: srch_flat_fwd.c(760): Writing lattice file: E:\users\pranav\sphinx\sphinxtest\tes
    INFO: vithist.c(1999): Writing lattice file in Sphinx III format: E:\users\pranav\sphin
    ERROR: "srch_flat_fwd.c", line 779:
     Inside srch_FLAT_FWD_nbest_impl
    INFO: astar.c(676): Writing N-Best list to E:\users\pranav\sphinx\sphinxtest\test1\nbes
    INFO: astar.c(713): N-Best search(ananas):    97 frm    6 hyp     34 pop     25 exp
    INFO: stat.c(174):   97 frm;     0 cdsen/fr,  273 cisen/fr,     0 cdgau/fr,  2002 cigau
    0.06 Clk (ananas)
    INFO: corpus.c(662): ananas:    0.2 sec CPU,   15.3 sec Clk;  TOT:      0.2 sec CPU,
    

    and here is the log for s3_astar

    INFO: info.c(73): c:\Users\rmuser\Desktop\sphinxTutorial\sphinx3\bin\Debug\sphin
    x3_astar.exe Compiled on: May 22 2012, AT: 18:54:30
    
    INFO: cmd_ln.c(512): Parsing command line:
    c:\Users\rmuser\Desktop\sphinxTutorial\sphinx3\bin\Debug\sphinx3_astar.exe \
            -latext lat \
            -latcompress no \
        -beam 1e-55 \
            -nbestext nbest.astar.txt \
            -ctlcount 1 \
            -mdef E:\users\pranav\sphinx\sphinxtest\test1\hmm1\mdef \
            -mdef_fillers yes \
            -lm E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.lm \
            -dict E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.dic.txt \
            -fdict E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.filler.txt \
            -ctl E:\users\pranav\sphinx\sphinxtest\test1\list_one \
            -nbestdir E:\users\pranav\sphinx\sphinxtest\test1\nbest \
            -inlatdir E:\users\pranav\sphinx\sphinxtest\test1\nbest
    
    Current configuration:
    [NAME]          [DEFLT]         [VALUE]
    -beam           1e-64           1.000000e-055
    -build_outdirs  yes             yes
    -ctl                            E:\users\pranav\sphinx\sphinxtest\test1\list_one
    
    -ctlcount       1000000000      1
    -ctloffset      0               0
    -ctl_lm
    -dagfudge       2               2
    -debug                          0
    -dict                           E:\users\pranav\sphinx\sphinxtest\test1\lm1\test
    1.dic.txt
    -fdict                          E:\users\pranav\sphinx\sphinxtest\test1\lm1\test
    1.filler.txt
    -fillpen
    -fillprob       0.1             1.000000e-001
    -inlatdir                       E:\users\pranav\sphinx\sphinxtest\test1\nbest
    -latcompress    yes             no
    -latext         lat.gz          lat
    -lm                             E:\users\pranav\sphinx\sphinxtest\test1\lm1\test
    1.lm
    -lmctlfn
    -lmdumpdir
    -lmname
    -log3table      yes             yes
    -logbase        1.0003          1.000300e+000
    -logfn
    -lts_mismatch   no              no
    -lw             9.5             9.500000e+000
    -maxedge        2000000         2000000
    -maxlmop        100000000       100000000
    -maxlpf         40000           40000
    -maxppath       1000000         1000000
    -mdef                           E:\users\pranav\sphinx\sphinxtest\test1\hmm1\mde
    f
    -mdef_fillers   no              yes
    -min_endfr      3               3
    -nbest          200             200
    -nbestdir       .               E:\users\pranav\sphinx\sphinxtest\test1\nbest
    -nbestext       nbest.gz        nbest.astar.txt
    -ppathdebug     no              no
    -silprob        0.1             1.000000e-001
    -uw             0.7             7.000000e-001
    -wip            0.7             7.000000e-001
    
    INFO:   Initialization of the log add table
    INFO:   Log-Add table size = 29356 x 2 >> 0
    INFO:
    INFO: mdef.c(683): Reading model definition: E:\users\pranav\sphinx\sphinxtest\t
    est1\hmm1\mdef
    INFO: dict.c(385): Reading main dictionary: E:\users\pranav\sphinx\sphinxtest\te
    st1\lm1\test1.dic.txt
    INFO: dict.c(388): 6 words read
    INFO: dict.c(393): Reading filler dictionary: E:\users\pranav\sphinx\sphinxtest\
    test1\lm1\test1.filler.txt
    INFO: dict.c(396): 10 words read
    INFO: dict.c(412): Adding filler word: ++A++
    INFO: dict.c(412): Adding filler word: ++AIR++
    INFO: dict.c(412): Adding filler word: ++BABBLE++
    INFO: dict.c(412): Adding filler word: ++BEEP++
    INFO: dict.c(412): Adding filler word: ++BG_NOISE++
    INFO: dict.c(412): Adding filler word: ++BIRD++
    INFO: dict.c(412): Adding filler word: ++CAR_HORN++
    INFO: dict.c(412): Adding filler word: ++CHLDSHOUT++
    INFO: dict.c(412): Adding filler word: ++COUGH++
    INFO: dict.c(412): Adding filler word: ++LAUGH++
    INFO: dict.c(412): Adding filler word: ++LD++
    INFO: dict.c(412): Adding filler word: ++M++
    INFO: dict.c(412): Adding filler word: ++MIC++
    INFO: dict.c(412): Adding filler word: ++MUSIC++
    INFO: dict.c(412): Adding filler word: ++PAPER++
    INFO: dict.c(412): Adding filler word: ++PHONERING++
    INFO: dict.c(412): Adding filler word: ++TAK++
    INFO: dict.c(412): Adding filler word: ++THROAT++
    INFO: dict.c(429): Added 18 fillers from mdef file
    INFO: lm.c(612): LM read('E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.lm',
     lw= 9.50, wip= 0.70, uw= 0.70)
    INFO: lm.c(614): Reading LM file E:\users\pranav\sphinx\sphinxtest\test1\lm1\tes
    t1.lm (LM name "default")
    INFO: lm_3g_dmp.c(472): Bad magic number: 589505315(23232323), not an LM dumpfil
    e??
    INFO: lm.c(622): In lm_read, LM is not a DMP file. Trying to read it as a txt fi
    le
    INFO: lm_3g.c(832): Reading LM file E:\users\pranav\sphinx\sphinxtest\test1\lm1\
    test1.lm
    INFO: lm_3g.c(849): ngrams 1=7, 2=1, 3=1
    INFO: lm_3g.c(338):        1 = tseg_base entries allocated
    INFO: lm_3g.c(372): Reading unigrams
    INFO: lm_3g.c(919):        7 = #unigrams created
    INFO: lm_3g.c(447): Reading bigrams
    INFO: lm_3g.c(937):        0 = #bigrams created
    INFO: lm_3g.c(938):        1 = #prob2 entries
    INFO: lm_3g.c(945):        1 = #bo_wt2 entries
    INFO: lm_3g.c(572): Reading trigrams
    INFO: lm_3g.c(963):        0 = #trigrams created
    INFO: lm_3g.c(964):        1 = #prob3 entries
    INFO: lm.c(710): The LM routine is operating at 16 bits mode
    INFO: dag.c(1159): Reading DAG file: E:\users\pranav\sphinx\sphinxtest\test1\nbe
    st/ananas.lat
    INFO: dag.c(1315): dag->nfrm+1, 98
    INFO: main_astar.c(421):    97 frames,     11 nodes,       46 edges,        0 by
    pass
    INFO: astar.c(676): Writing N-Best list to E:\users\pranav\sphinx\sphinxtest\tes
    t1\nbest/ananas.nbest.astar.txt
    INFO: astar.c(713): N-Best search(ananas):    97 frm    3 hyp     21 pop     16
    exp        0 pp
    INFO: lm.c(969):         0 tg(),         0 tgcache,        0 bo;     0 fills,
         0 in mem (0.0%)
    INFO: lm.c(973):        0 bg(),        0 bo;     0 fills,        0 in mem (0.0%)
    
    ananas: TMR:    97 Frm  16.81 xEl   0.00 xCPU
    INFO: corpus.c(662): ananas:    0.0 sec CPU,   20.3 sec Clk;  TOT:      0.0 sec
    CPU,     20.3 sec Clk
    

    and below is the nbest list for s3_decode

    # ananas
    # frames 97
    # logbase 1.000300e+000
    # langwt 9.500000e+000
    # inspen 7.000000e-001
    # beam 1.000000e-055
    T -1131359 A -981522 L -15522 0 -78530 0 <s> 3 -902992 -5536 ananasa 92 0 -9986 </s> 97
    T -1268487 A -1022594 L -25508 0 -78530 0 <s> 3 -539922 -5536 ananasa 67 -404142 -9986 </s> 92 0 -9986 </s> 97
    T -1330419 A -1052690 L -28734 0 -78530 0 <s> 3 -515650 -5536 ananasa 63 -146036 -7676 +AIR+ 83 -312474 -5536 bhaat 92 0 -9986 </s> 97
    T -1449430 A -1149756 L -31044 0 -78530 0 <s> 3 -539922 -5536 ananasa 67 -218830 -9986 </s> 83 -312474 -5536 bhaat 92 0 -9986 </s> 97
    T -1455694 A -1156020 L -31044 0 -78530 0 <s> 3 -441255 -5536 ananasa 40 -232093 -5536 bhaat 67 -404142 -9986 </s> 92 0 -9986 </s> 97
    T -1532954 A -1201444 L -34270 0 -78530 0 <s> 3 -441255 -5536 ananasa 40 -223149 -5536 bhaat 63 -146036 -7676 +AIR+ 83 -312474 -5536 bhaat 92 0 -9986 </s> 97
    End; best -1131359 worst -1532954 diff -401595 beam -422203
    

    below is the nbest list for s3_astar

    # ananas
    # frames 97
    # logbase 1.000300e+000
    # langwt 9.500000e+000
    # inspen 7.000000e-001
    # beam 1.000000e-055
    T -1232981 A -1083144 L -15522 0 -78530 0 <s> 3 -902992 -5536 ananasa 92 -101622 -9986 </s> 97
    T -1432041 A -1154312 L -28734 0 -78530 0 <s> 3 -515650 -5536 ananasa 63 -146036 -7676 +AIR+ 83 -312474 -5536 bhaat 92 -101622 -9986 </s> 97
    End; best -1232981 worst -1432041 diff -199060 beam -422203
    
     
  • Pranav Jawale

    Pranav Jawale - 2012-05-22

    Update:

    I was able to dump the dag that is sent to nbest_search in s3_astar. There are
    2 nodes less in it as compared to the those in *lat file that was given as
    input.

    [b]INPUT LATTICE FILE[/b]
    
    # getcwd: E:\users\pranav\sphinx\sphinxtest\test1
    # -logbase 1.000300e+000
    # -dict E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.dic.txt
    # -fdict E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.filler.txt
    # -lm E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.lm
    # -hmm E:\users\pranav\sphinx\sphinxtest\test1\hmm1
    # -mdef E:\users\pranav\sphinx\sphinxtest\test1\hmm1/mdef
    # -mean E:\users\pranav\sphinx\sphinxtest\test1\hmm1/means
    # -var E:\users\pranav\sphinx\sphinxtest\test1\hmm1/variances
    # -mixw E:\users\pranav\sphinx\sphinxtest\test1\hmm1/mixture_weights
    # -tmat E:\users\pranav\sphinx\sphinxtest\test1\hmm1/transition_matrices
    # -senmgau .cont.
    # -min_endfr 3
    #
    Frames 97
    #
    Nodes 13 (NODEID WORD STARTFRAME FIRST-ENDFRAME LAST-ENDFRAME)
    0 </s> 92 94 96
    1 bhaat 83 91 96
    2 +BABBLE+ 82 84 96
    3 +BABBLE+ 73 75 82
    4 +BG_NOISE+ 73 75 96
    5 +AIR+ 73 91 96
    6 </s> 67 69 91
    7 <sil> 67 69 91
    8 +AIR+ 63 65 90
    9 bhaat 40 63 83
    10 bhaat 3 12 25
    11 ananasa 3 37 96
    12 <s> 0 2 16
    

    and for s3_astar the lattice is as below -

    [b]ASTAR dag[/b]
    # getcwd: E:\users\pranav\sphinx\sphinxtest\test1
    # -logbase 1.000300e+000
    # -dict E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.dic.txt
    # -fdict E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.filler.txt
    # -lm E:\users\pranav\sphinx\sphinxtest\test1\lm1\test1.lm
    # -mdef E:\users\pranav\sphinx\sphinxtest\test1\hmm1\mdef
    # -min_endfr 3
    #
    Frames 97
    #
    Nodes 11 (NODEID WORD STARTFRAME FIRST-ENDFRAME LAST-ENDFRAME)
    0 </s> 92 94 96
    1 bhaat 83 91 96
    2 +BABBLE+ 82 84 96
    3 +BABBLE+ 73 75 82
    4 +BG_NOISE+ 73 75 96
    5 +AIR+ 73 91 96
    6 <sil> 67 69 91
    7 +AIR+ 63 65 90
    8 bhaat 40 63 83
    9 ananasa 3 37 96
    10 <s> 0 2 16
    

    For some reason there are 2 less nodes in s3_astar dag ....

     
  • Nickolay V. Shmyrev

    The issue that was here is that dag construction created a link from to
    which was stripped in astar during loading. Dag construction is fixed now
    in trunk.

     
  • Pranav Jawale

    Pranav Jawale - 2012-05-29

    Thanks!

     

Log in to post a comment.