Menu

Building perl scripts_pl/50.cd_hmm_tied/slave_convg.pl

Help
2016-11-06
2016-11-08
  • Pradeep S V

    Pradeep S V - 2016-11-06

    perl scripts_pl/50.cd_hmm_tied/slave_convg.pl
    while running this am getting the following error. Can you please help me

    sitecsp@acl-pg-06:~/Documents/TIMIT_an4/an4$ perl scripts_pl/50.cd_hmm_tied/slave_convg.pl
    MODULE: 50 Training Context dependent models
        Phase 1: Cleaning up directories:
        accumulator...logs...qmanager...
        Phase 2: Copy CI to CD initialize
        Phase 3: Forward-Backward
            Baum welch starting for 1 Gaussian(s), iteration: 1 (1 of 1)
            0% FATAL_ERROR: "main.c", line 1054: initialization failed
    
    Failed to start bw
    Only 0 parts of 1 of Baum Welch were successfully completed
    Parts 1 failed to run!
    Training failed in iteration 1
    

    In log dir it says

            INFO: main.c(196): Compiled on Nov  5 2016 at 14:32:21
    /home/sitecsp/Documents/TIMIT_an4/an4/bin/bw \
     -moddeffn /home/sitecsp/Documents/TIMIT_an4/an4/model_architecture/an4.1000.mdef \
     -ts2cbfn .cont. \
     -mixwfn /home/sitecsp/Documents/TIMIT_an4/an4/model_parameters/an4.cd_cont_initial/mixture_weights \
     -mwfloor 1e-05 \
     -tpfloor 1e-05 \
     -tmatfn /home/sitecsp/Documents/TIMIT_an4/an4/model_parameters/an4.cd_cont_initial/transition_matrices \
     -meanfn /home/sitecsp/Documents/TIMIT_an4/an4/model_parameters/an4.cd_cont_initial/means \
     -varfn /home/sitecsp/Documents/TIMIT_an4/an4/model_parameters/an4.cd_cont_initial/variances \
     -ltsoov no \
     -dictfn /home/sitecsp/Documents/TIMIT_an4/an4/etc/an4.dic \
     -fdictfn /home/sitecsp/Documents/TIMIT_an4/an4/etc/an4.filler \
     -ctlfn /home/sitecsp/Documents/TIMIT_an4/an4/etc/an4_train.fileids \
     -part 1 \
     -npart 1 \
     -cepdir /home/sitecsp/Documents/TIMIT_an4/an4/feat \
     -cepext mfc \
     -lsnfn /home/sitecsp/Documents/TIMIT_an4/an4/etc/an4_train.transcription \
     -accumdir /home/sitecsp/Documents/TIMIT_an4/an4/bwaccumdir/an4_buff_1 \
     -varfloor 0.0001 \
     -topn 8 \
     -abeam 1e-90 \
     -bbeam 1e-10 \
     -agc none \
     -cmn current \
     -varnorm no \
     -meanreest yes \
     -varreest yes -2passvar no \
     -tmatreest yes \
     -fullvar no \
     -diagfull no \
     -feat 1s_c_d_dd \
     -ceplen 13 \
     -cepwin 0 \
     -timing no
    
    [Switch]         [Default] [Value]
    -help            no        no     
    -example         no        no     
    -hmmdir                           
    -moddeffn                  /home/sitecsp/Documents/TIMIT_an4/an4/model_architecture/an4.1000.mdef
    -tmatfn                    /home/sitecsp/Documents/TIMIT_an4/an4/model_parameters/an4.cd_cont_initial/transition_matrices
    -mixwfn                    /home/sitecsp/Documents/TIMIT_an4/an4/model_parameters/an4.cd_cont_initial/mixture_weights
    -meanfn                    /home/sitecsp/Documents/TIMIT_an4/an4/model_parameters/an4.cd_cont_initial/means
    -varfn                     /home/sitecsp/Documents/TIMIT_an4/an4/model_parameters/an4.cd_cont_initial/variances
    -fullvar         no        no     
    -diagfull        no        no     
    -mwfloor         0.00001   1.000000e-05
    -tpfloor         0.0001    1.000000e-05
    -varfloor        0.00001   1.000000e-04
    -topn            4         8      
    -dictfn                    /home/sitecsp/Documents/TIMIT_an4/an4/etc/an4.dic
    -fdictfn                   /home/sitecsp/Documents/TIMIT_an4/an4/etc/an4.filler
    -ltsoov          no        no     
    -ctlfn                     /home/sitecsp/Documents/TIMIT_an4/an4/etc/an4_train.fileids
    -nskip                            
    -runlen          -1        -1     
    -part                      1      
    -npart                     1      
    -cepext          mfc       mfc    
    -cepdir                    /home/sitecsp/Documents/TIMIT_an4/an4/feat
    -phsegext        phseg     phseg  
    -phsegdir                         
    -outphsegdir                      
    -sentdir                          
    -sentext         sent      sent   
    -lsnfn                     /home/sitecsp/Documents/TIMIT_an4/an4/etc/an4_train.transcription
    -accumdir                  /home/sitecsp/Documents/TIMIT_an4/an4/bwaccumdir/an4_buff_1
    -ceplen          13        13     
    -cepwin          0         0      
    -agc             max       none   
    -cmn             current   current
    -varnorm         no        no     
    -silcomp         none      none   
    -sildel          no        no     
    -siltag          SIL       SIL    
    -abeam           1e-100    1.000000e-90
    -bbeam           1e-100    1.000000e-10
    -varreest        yes       yes    
    -meanreest       yes       yes    
    -mixwreest       yes       yes    
    -tmatreest       yes       yes    
    -mllrmat                          
    -cb2mllrfn       .1cls.    .1cls. 
    -ts2cbfn                   .cont. 
    -feat            1s_c_d_dd 1s_c_d_dd
    -svspec                           
    -ldafn                            
    -ldadim          29        29     
    -ldaaccum        no        no     
    -timing          yes       no     
    -viterbi         no        no     
    -2passvar        no        no     
    -sildelfn                         
    -spthresh        0.0       0.000000e+00
    -maxuttlen       0         0      
    -ckptintv                         
    -outputfullpath  no        no     
    -fullsuffixmatch no        no     
    -pdumpdir                         
    INFO: main.c(255): Reading /home/sitecsp/Documents/TIMIT_an4/an4/model_architecture/an4.1000.mdef
    WARN: "model_def_io.c", line 436: Unable to open /home/sitecsp/Documents/TIMIT_an4/an4/model_architecture/an4.1000.mdef for reading; No such file or directory
    FATAL_ERROR: "main.c", line 1054: initialization failed
    Sun Nov  6 13:35:38 2016
    

    Thanks in advance.

     
    • Arseniy Gorin

      Arseniy Gorin - 2016-11-06

      The error appears earlier when creating mdef file. It sould be easier to help if you provided all logs

       
  • Pradeep S V

    Pradeep S V - 2016-11-06

    Thank you for your response.
    I have made zip file of log dir attached below please find it.

     
    • Arseniy Gorin

      Arseniy Gorin - 2016-11-06

      The training data has not enough triphones covered. Try to reduce CFG_N_TIED_STATES in the config file. 200 should be fine for your data set

       
  • Pradeep S V

    Pradeep S V - 2016-11-06

    Can you please tell me where I find the config file so that I can make changes suggested by you.

     
    • Arseniy Gorin

      Arseniy Gorin - 2016-11-06

      check etc/sphinx_train.cfg

       
  • Pradeep S V

    Pradeep S V - 2016-11-06

    Sir,initially CFG_N_TIED_STATES value will be1000 now I have changed to 200 and re run all the stepseven then I am getting same error.

     
  • Arseniy Gorin

    Arseniy Gorin - 2016-11-06

    I think I need your full training working directory to reproduce the error. Can you provide it?

     
  • Pradeep S V

    Pradeep S V - 2016-11-06

    Sir, today the institution is already closed tomorrow I will send you. Thank you.

     
  • Pradeep S V

    Pradeep S V - 2016-11-07

    Sir, I am extremely sorry, I am not able to upload project directories it is around 350 MB. Please help me in this regard. Thank you.

     
  • Pradeep S V

    Pradeep S V - 2016-11-07

    Sir, i am uploading working directory part by part please find the attachment below.
    Thank you.

     
    • Arseniy Gorin

      Arseniy Gorin - 2016-11-07

      I can't run your example without all files, but according to your transcripts, there are just few words in the training data and eventually you have 63 full triphones:

      INFO: mk_mdef_gen.c(835): 25 n_base, 63 n_tri

      This means, for you task you should either just use the model produced in an4.ci_cont (simply use it in the decoder) or if you further reduce CFG_N_TIED_STATES (no more than 150). I think cd model will not provide much accuracy gain though

       
  • Pradeep S V

    Pradeep S V - 2016-11-07

    Sir, thanks for your reply. Now I have reduced this value from 200 to 120 even then I am getting the same error. As you mentioned in the above to use only an4.ci_cont what are the steps I need to follow.

    perl scripts_pl/00.verify/verify_all.pl
    perl scripts_pl/10.vector_quantize/slave.VQ.pl
    perl scripts_pl/20.ci_hmm/slave_convg.pl
    perl scripts_pl/30.cd_hmm_untied/slave_convg.pl
    perl scripts_pl/40.buildtrees/slave.treebuilder.pl
    perl scripts_pl/45.prunetree/slave-state-tying.pl
    perl scripts_pl/50.cd_hmm_tied/slave_convg.pl
    perl scripts_pl/90.deleted_interpolation/deleted_interpolation.pl
    perl scripts_pl/99.make_s2_models/make_s2_models.pl
    

    Whether I need to run all these steps.
    How to use an4.ci_cont in decoder can you please tell me.
    what all the files i need to send you sir can you please mention so that I can send that files.

     
  • Arseniy Gorin

    Arseniy Gorin - 2016-11-07

    How to use an4.ci_cont in decoder can you please tell me:

    run training till perl scripts_pl/30.cd_hmm_untied/slave_convg.pl and then decode with pocketsphinx as described here:
    http://cmusphinx.sourceforge.net/wiki/tutorialam#using_the_model

    what all the files i need to send you sir can you please mention so that I can send that files.

    the entire an4 folder

     

    Last edit: Arseniy Gorin 2016-11-07
  • Pradeep S V

    Pradeep S V - 2016-11-07

    Sir, I am using cmu sphinx3.
    I have executed the following commands in sequence.
    perl scripts_pl/00.verify/verify_all.pl perl scripts_pl/10.vector_quantize/slave.VQ.pl perl scripts_pl/20.ci_hmm/slave_convg.pl perl scripts_pl/30.cd_hmm_untied/slave_convg.pl
    And followed the instructions which are there in the above link given by you.
    For decoding i use the following command mentioned in the link.
    sphinxtrain -s decode run
    I am getting following error.
    sitecsp@acl-pg-06:~/Documents/PPDIW/an4$ sphinxtrain -s decode run
    The program 'sphinxtrain' is currently not installed. You can install it by typing:
    sudo apt-get install sphinxtrain

     
  • Arseniy Gorin

    Arseniy Gorin - 2016-11-07

    Finally I just run your directory and it works out-of-the-box.

    1. You should install latest versions of sphinxtrain, sphinxbase and pocketsphinx as described here

    2. After that, remove all unnecessary files (you keep only etc and wav, also remove .cfg files from etc folder)

    3. Run from sphinxtrain directory sphinxtrain -t an4 setup
    4. Modify an4/etc/sphinx_train.cfg a little bit:

    $CFG_WAVFILE_EXTENSION = 'sph';
    $CFG_WAVFILE_TYPE = 'nist'; # one of nist, mswav, raw

    $CFG_LANGUAGEMODEL = "$CFG_LIST_DIR/$CFG_DB_NAME.ug.lm.DMP";

    $DEC_CFG_LANGUAGEMODEL = "$CFG_BASE_DIR/etc/${CFG_DB_NAME}.ug.lm.DMP";

    1. Run sphinxtrain run from an4 directory

    With your data and the process described above you should get suspiciously good results:

    TOTAL Percent correct = 99.83% Error = 0.28% Accuracy = 99.72%
    TOTAL Insertions: 4 Deletions: 3 Substitutions: 3
    
     
  • Pradeep S V

    Pradeep S V - 2016-11-08

    Thank you sir for your reply.
    Sir, I have completed the instructions given in the tutorial link.
    For pocket sphinx and sphinx base installation I followed this link.
    [http://cmusphinx.sourceforge.net/wiki/tutorialpocketsphinx]
    And, for sphinxtrain I followed this link.
    [http://cmusphinx.sourceforge.net/wiki/tutorialam]

    tutorial
        an4
        an4_sphere.tar.gz
        sphinxtrain
        sphinxtrain-5prealpha.tar.gz
        pocketsphinx
        pocketsphinx-5prealpha.tar.gz
        sphinxbase
        sphinxbase-5prealpha.tar.gz
    

    Till this I have finished but after this I am able to understand the following instructions.

    You will need to install software as an administrator root. After you installed the software you may need to update the system configuration so the system will be able to find the dynamic libraries. For example
    
    export PATH=/usr/local/bin:$PATH
    export LD_LIBRARY_PATH=/usr/local/lib
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    If you don't want to install into system path, you may install in your home folder. In that case you can append the following option to autogen.sh script or to the configure script
    
    --prefix=/home/user/local
    Obvsiously the folder can be an arbitrary folder but remember to update the environment configuration after that. If you will find that your binaries fail to load dynamic libraries, something like failed to open libsphinx.so.0 no such file or directory it means that you didn't configure the environment properly.
    

    I have skipped this instructions and try to run this command in sphinxtrain folder.

    sphinxtrain -t an4 setup
    

    It shows

    sitecsp@acl-pg-06:~/final_timit/sphinxtrain-5prealpha$ sphinxtrain -t an4 setup
    Sphinxtrain path: /usr/local/lib/sphinxtrain
    Sphinxtrain binaries path: /usr/local/libexec/sphinxtrain
    Setting up the database an4
    

    But in an4 folder there is no sphinx_train.cfg file.
    Please help me.

     
    • Arseniy Gorin

      Arseniy Gorin - 2016-11-08

      I have skipped this instructions and try to run this command in sphinxtrain folder.

      Do you have root permissions on your computer? You should install with ./configure & sudo make & sudo make install
      If you cannot di sudo, you should specify a local folder in prefix and set path in ~/.bashrc file as tutorial suggests

      But in an4 folder there is no sphinx_train.cfg file.

      what about an4/etc/sphinx_train.cfg ?

       

      Last edit: Arseniy Gorin 2016-11-08
  • Pradeep S V

    Pradeep S V - 2016-11-08

    Sir, finally I got the output thank you so much.
    Previously I have done one mistake I am trying to run this command

    sphinxtrain -t an4 setup
    

    in sphinxtrain that's why .cfg file is not copied to an4 folder.
    Now I try to run this command in an4 folder then it will generate .cfg file in an4/etc.
    Once again thank you so much sir.

     
    • Arseniy Gorin

      Arseniy Gorin - 2016-11-08

      No problem. You are welcome

       
  • Pradeep S V

    Pradeep S V - 2016-11-08

    Sir, I want you to know how the probability values are calculated in language model for 1-gram,2-gram,3-gram.
    Is their any mathematical relation is their to calculate.

    -1.3979 </s> -0.3010
    -1.3979 <s> -0.2833
    -1.6990 ALL -0.2923
    -1.6990 AN -0.2923
    -1.6990 ASK -0.2923
    -1.6990 CARRY -0.2923
    

    What is that left and right value indicate.
    Thank you.

     
    • Arseniy Gorin

      Arseniy Gorin - 2016-11-08

      Left one is log probability of the corresponding unigram, right one is back-off weight.
      Check this https://web.stanford.edu/class/cs124/lec/languagemodeling.pdf

      In the future, the forum rules require you to create a new post if the question is new. Also, I think I already saw this question in this forum a few days ago and it seems it was coming from some of your colleagues

       

      Last edit: Arseniy Gorin 2016-11-08
  • Pradeep S V

    Pradeep S V - 2016-11-08

    Ok sir, I will abide by the rules of the forum and I also inform my colleague about the same.
    Thank you for your kind help.

     

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.