Menu

Sphinxtrain bw

Help
Harish
2016-07-04
2020-08-11
  • Harish

    Harish - 2016-07-04

    i want to adapt timit database to downloaded cmusphinx-en-us-5.2 model but i am getting the following error

    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: main.c(318): Reading en-us/mdef.txt
    ERROR: "model_def_io.c", line 422: ERROR not even a version number in en-us/mdef.txt!?

     
    • Nickolay V. Shmyrev

      This error means mdef file does not have correct format.

       
      • Harish

        Harish - 2016-07-05

        but i downloaded it from sourceforge models : I thought itt was foolproof :can u give me correcct format of mdef for cont model

         
        • Nickolay V. Shmyrev

          If you follow the tutorial precisely everything should work

           
          • Harish

            Harish - 2016-07-05

            I am yet getting an error after follwing tutorial . My mdef is like following:
            0.3
            42 n_base
            137053 n_tri
            548380 n_state_map
            5126 n_tied_state
            126 n_tied_ci_state
            42 n_tied_tmat
            ......
            And I am using cygwin bash to use this on windows :
            $ D:/Sphinx/sphinxtrain/bin/Release/x64/bw -hmmdir en-us -moddeffn en-us/mdef.txt
            -ts2cbfn .ptm. -feat 1s_c_d_dd -svspec 0-12/13-25/26-38 -cmn current -agc none -di
            ctfn cmudict-en-us.dict -ctlfn arctic20.fileids -lsnfn arctic20.transcription -acc
            umdir .

             
            • Nickolay V. Shmyrev

              It tries to open mdef.txt, not mdef. Your mdef.txt is likely empty.

               
  • Luca Montanari

    Luca Montanari - 2020-04-22

    Up, because I have the same problem here. Following the tutorial I converted from binary to txt the mdef file. I have left only the converted file in the folder that it starts as follow:

    0.3
    42 n_base
    137053 n_tri
    548380 n_state_map
    5126 n_tied_state
    126 n_tied_ci_state
    42 n_tied_tmat
    #
    # Columns definitions
    #base lft  rt p attrib tmat      ... state id's ...
    +NSN+   -   - - filler    0      0      1      2 N
    +SPN+   -   - - filler    1      3      4      5 N
       AA   -   - -    n/a    2      6      7      8 N
       AE   -   - -    n/a    3      9     10     11 N
       AH   -   - -    n/a    4     12     13     14 N
       AO   -   - -    n/a    5     15     16     17 N
       AW   -   - -    n/a    6     18     19     20 N
    

    tried also the plain files in cmusphinx-en-us-ptm-5.2.tar.gz and cmusphinx-en-us-8khz-5.2.tar.gz but with the same result. Both with and w/out adding the .txt extension

    ERROR: "model_def_io.c", line 422: ERROR not even a version number in C:\Users\Luca\CMUSphinx\en-us\mdef.txt!?

    I'm working on Windows 10 command line with admin rights.

    Thanks!

     

    Last edit: Luca Montanari 2020-04-22
  • Kaustubh Kadu

    Kaustubh Kadu - 2020-08-11

    This comment / solution is just based on my experience as I am not an expert on this. I had this same exact error after following all the instructions from adapting-the-model and looks like the mdef file from sourge-forge is corrupted. So I landed up on a comment on some other website where it mentioned to download the setup files for pocketsphinx, sphinxbase and sphinxtrain from github directly. So I downloaded it from here GitHub and followed the same steps from before. Since I was working on windows, I rebuilt using VS Studio later, after upgrading the project from 2012 to latest version.

    Steps (from GitHub)-

    1. You should download and unpack it to the same parent directory as PocketSphinx, so that the configure script and project files can find it. On Windows, you will need to rename 'sphinxbase-X.Y' (where X.Y is the SphinxBase version number) to simply 'sphinxbase' for this to work.
    2. To compile the SphinxTrain under MS Visual Studio 2010
    3. load SphinxTrain.sln located in SphinxTrain directory
    4. compile all the projects in SphinxTrain (from SphinxTrain.sln) MS Visual Studio will build the executables under .\bin\Release or .\bin\Debug (depending on the version you choose on MS Visual Studio), and the libraries under .\lib\Release or .\lib\Build.
    5. Once you finished with compilation, copy the pocketsphinx and sphinxbase tools and dlls from sphinxbase\bin\Releae and pocketsphinx\bin\Release to sphinxtrain\bin\Release folder. This will enable you to run the training process which expects to see all the tools and libraries in sphinxtrain\bin\Release.
     

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.