Menu

training problem for sphinx2 and pocketsphinx

Help
mandee
2007-11-20
2012-09-22
  • mandee

    mandee - 2007-11-20

    Hi there,

    I am new for Sphinx and running into some problems. Could anyone help me? Thank you alot.

    I am following the tutorial, using rm1 dataset and sphinx2/pocketsphinx as decoder.

    I did the modification in etc/sphinx_train.cfg for the CFG_HMM_TYPE, and set it as '.semi'

    When I train the model, I got thousands of warnings in the module 10 - vector quantization as following:

    INFO: main.c(1307): 1-class dump file
    INFO: main.c(1345): Corpus 0: sz==549216 frames
    INFO: main.c(1354): Convergence ratios are abs(cur - prior) / abs(prior)
    INFO: main.c(234): alloc'ing 25Mb obs buf
    INFO: main.c(536): Initializing means using random k-means
    INFO: main.c(539): Trial 0: 256 means
    INFO: kmeans.c(153): km iter [0] 1.000000e+00 ...
    WARNING: "kmeans.c", line 431: Empty cluster 1
    ....
    WARNING: "kmeans.c", line 431: Empty cluster 255

    then, The training process failed at first iteration in module 20, giving me following 3000 erros in rm1.1.1-1.bw.log

    utt> 4 sr245 276 0 180 150 WARNING: "gauden.c", line 1370: Scaling factor too small: -2324.416689
    WARNING: "gauden.c", line 1370: Scaling factor too small: -3570.476303
    WARNING: "gauden.c", line 1370: Scaling factor too small: -134625.680303
    WARNING: "gauden.c", line 1370: Scaling factor too small: -2208.159695
    ERROR: "backward.c", line 980: alpha(2.625374e-01) <> sum of alphas * betas (0.000000e+00) in frame 274
    ERROR: "baum_welch.c", line 331: hes0_5/sr245 ignored

    I think I should tune some parameters such that the kmean is better initialized, but I didn't get any clue how to do that. Is it my problem? Can anyone help with that? Any suggestion is highly appreciated. Thank you.

     
    • mandee

      mandee - 2007-11-29

      Hi there,

      Thank you all for your help. I finally got everything work smoothly. I am now using sphinxbase 0.3 and pocketsphinx 0.4.1, downloading from sourceforge page suggested by David. SphinxTrain is from SVN (the tarbar one is not working on my case (I am using XP, VS2003, activeperl, some .c files are missing during my compilation, I also tried on linux machine CentrOS, still...)).

      For sphinx2, I am using SphinxTrain and Sphinx2 from SVN, everything runs smooth.
      For sphinx3, it is my first try. I am following the tutorial, no problem.

      So happy to get everything work well :). Thanks again for helping me out. Will keep learning more about Sphinx.

       
    • Nickolay V. Shmyrev

      It's the problem in your configuration files/data. Check everything again and post full training log and etc directory if it still fails.

       
    • mandee

      mandee - 2007-11-26

      Hi, Thank you very much for your help. Is there any particular item in the rm1/etc/configuration file I should pay attention to for this problem? sphinx_train.cfg is automatically generated, shall I do something to avoid the problem before generating this file?

      Mandee

       
    • mandee

      mandee - 2007-11-26

      The following is my log from rm1.kmean.log, thousands of warnings and 2 errors. Is that possible for you to detect the problem from it? Thank you alot.

      INFO: main.c(1307): 1-class dump file
      INFO: main.c(1345): Corpus 0: sz==549216 frames
      INFO: main.c(1354): Convergence ratios are abs(cur - prior) / abs(prior)
      INFO: main.c(234): alloc'ing 25Mb obs buf
      INFO: main.c(536): Initializing means using random k-means
      INFO: main.c(539): Trial 0: 256 means
      INFO: kmeans.c(153): km iter [0] 1.000000e+00 ...
      WARNING: "kmeans.c", line 431: Empty cluster 1
      ....
      WARNING: "kmeans.c", line 431: Empty cluster 255
      INFO: main.c(572): -> Aborting k-means, bad initialization
      INFO: main.c(581): best-so-far sqerr = -1.000000e+00
      ERROR: "main.c", line 800: Too few observations for kmeans
      ERROR: "main.c", line 1363: Unable to do k-means for state 0; skipping...
      INFO: s3gau_io.c(226): Wrote /home/Manli/tutorial/rm1/model_parameters/rm1.ci_semi_flatinitial/means [1x4x256 array]
      INFO: s3gau_io.c(226): Wrote /home/Manli/tutorial/rm1/model_parameters/rm1.ci_semi_flatinitial/variances [1x4x256 array]
      INFO: main.c(1464): No mixing weight file given; none written
      INFO: main.c(1620): TOTALS: km 0.115x 1.009e+00 var 0.000x 0.000e+00 em 0.000x 0.000e+00 all 0.115x 1.009e+00
      Tue Nov 27 01:47:26 2007

       
      • coriscow

        coriscow - 2007-11-27

        Hi Mandee!

        I have just started with sphinx too. I run rm1 correctly and have just changed the CFG_HMM_TYPE to '.semi.' Have you noticed the second point?!?

        Regards

         
    • mandee

      mandee - 2007-11-27

      Hi Coriscow,

      I did the modification in etc/sphinx_train.cfg for the CFG_HMM_TYPE, and set it as '.semi' already. I run successfully on rm1-sphinx3. But run into the above problem when trying rm1-sphinx2/pocketpc. For the training part, the only difference between sphinx2/sphinx3 is CFG_HMM_TYPE, right? Thank you very much for your help.

      Mandee.

       
    • mandee

      mandee - 2007-11-27

      Hi Coriscow,

      Correct my last poster. I changed the CFG_HMM_TYPE to '.semi.' already.

      Regards,

      Mandee

       
    • mandee

      mandee - 2007-11-28

      Hi there,

      I run into the above the problem when I used the sphinxtrain downloaded by tarball. But when I work on the sphinxtrain obtained by svn, I didn't have this problem anymore. I did sucessfully on training and decoding using sphinx2 following the instruction on the tutorial. So, are the two version different?

      Now, I am praticing with the pocketsphinx. I am compiling sphinxbase and pocketsphinx using vc. sphinxbase is built succsessfully, but pocketsphinx has compiling error: several .c files could not be found: s2_mmap.c ,lm.c, cache_lm.c, libpocketsphinx.lib. So, the building result is 0 succesess, 10 failed. Can anyone help me with that? What is the problem. Thank you a lot.

       
      • coriscow

        coriscow - 2007-11-28

        Hi Mandee!!

        I don't know what the real problem is but I found the same problems (some missing .c files). Now I am working with PocketSphinx 0.4.1, SphinxBase 0.3 and SphinxTrain from the svn (I was unnable to find a previous release) and everything goes smooth. Try it out!!

        By the way, do you know about some other documentation apart from Hieroglyphs and the contens from the CMU website?? Those are fairly good but obscure for the newbies.

        Regards!

         
    • mandee

      mandee - 2007-11-28

      Hi Coriscow,

      Thank you very much for your suggestion. I will try new version then, hope it goes smoonth as yours. As for the other documents, I don't have any more besides that. I will keep eyes on it and share it with you as soon as I find any. Thanks again.

      Mandee

       
    • mandee

      mandee - 2007-11-28

      Hi Coriscow,

      Is this svn link you used to download Sphinxbase0.3 and pocketsphinx 0.4.1?
      svn co https://cmusphinx.svn.sourceforge.net:/svnroot/cmusphinx/trunk/sphinxbase
      svn co https://cmusphinx.svn.sourceforge.net:/svnroot/cmusphinx/trunk/pocketsphinx

      I could not compile this pocketsphinx as I mentioned above. And I can not find other svn resource for Sphinxbase0.3 and pocketsphinx 0.4.1. If the links you used are different from the ones above, could you please post the link here? Thanks alot.

      Mandee

       
      • David Huggins-Daines

        Hi, you can get them from the SourceForge download page:

        http://sourceforge.net/project/showfiles.php?group_id=1904

        There are tags for them in SVN but it's recommended that you use the downloadable versions instead.

        Remember that on Windows you will need to rename 'sphinxbase-0.3' to 'sphinxbase' to build pocketsphinx (I think).

        For better or worse, the trunk of the SVN repository often does not build on Windows at any given time. This is because it the Visual Studio project files need to be manually synchronized with the autotools-based system that's used on all other platforms.

        This is even worse now that we have two sets of project files. It's likely that the Visual Studio support will be dropped in the future, but we might support Eclipse or something like that instead.

         
    • coriscow

      coriscow - 2007-11-29

      Hi,

      Mandee, those you wrote are the correct svn sources, but it is better to download them from the sourceforge's project page. As David said, you have to rename both directories so as to leave just the name, without the version. Rebember to compile sphinxbase first.

      Keep me posted, regards!

       

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.