Menu

bw.exe has stopped working

Help
2014-06-08
2014-07-02
  • Hasibul Haque

    Hasibul Haque - 2014-06-08

    I am using
    Windows 8.1 64x
    sphinxbase-0.8-win32
    sphinxtrain-1.0.8-win32

    I am trying to follow Adapting the default acoustic model (http://cmusphinx.sourceforge.net/wiki/tutorialadapt) tutorial.

    According to tutorial i have used following command
    D:\acousticTrain\sphinxtrain\bin\Release\bw \
    -hmmdir hub4wsj_sc_8k \
    -moddeffn hub4wsj_sc_8k/mdef.txt \
    -ts2cbfn .cont. \
    -feat 1s_c_d_dd \
    -svspec 0-12/13-25/26-38 \
    -cmn current \
    -agc none \
    -dictfn hm3.dic \
    -ctlfn hm3_train.fileids \
    -lsnfn hm3_train.transcription \
    -accumdir

    I am getting error "bw.exe has stopped working" when i am using
    -ts2cbfn .cont.
    If i use -ts2cbfn .semi. then it works fine.

    But i want to adapt model for Sphinx4 not pocketSphinx.
    That’s why I need to use -ts2cbfn .cont.

    So how i can fix bw.exe has stopped working error so that I can adapt model for Sphinx4.

    I also checked this thread
    https://sourceforge.net/p/cmusphinx/discussion/help/thread/1fd2b80e/

    Please consider attached text file for text from command prompt.

    Waiting for your help.

     
  • Hasibul Haque

    Hasibul Haque - 2014-06-08

    Here is attached file.

     
    • Nickolay V. Shmyrev

      Remove -svspec

       
      • Hasibul Haque

        Hasibul Haque - 2014-06-08

        Thank you sir.

        After removing -svspec
        it is giving following error

        FATAL_ERROR: "mod_inv.c", line 357: Number of feature streams in mixture_weights
        file 3 differs from the configured value 1, check the command line options

         
        • Nickolay V. Shmyrev

          You are trying to adapt semi-continuous model hub4wsj_sc_8k for sphinx4. Semi-continouous models are not supported in sphinx4. You need to select continuous models for adaptation.

           
          • Hasibul Haque

            Hasibul Haque - 2014-06-09

            Thanks sir for your help.

            Can you kindly share a continuous model link so that I can use it for adaptation.

             
            • Nickolay V. Shmyrev

              Sphinx4 models are inside sphinx4 archive - sphin4/models/acoustic/wsj

              You can also try En-US generic acoustic model http://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/US%20English%20Generic%20Acoustic%20Model/en-us.tar.gz/download

               
              • Hasibul Haque

                Hasibul Haque - 2014-06-09

                Thanks a lot sir.
                After trying with given model i am getting error like following

                utt> 0 file_1 459INFO: cmn.c(175): CMN: 63.39 -0.36 1.9
                7 -0.12 0.18 -0.01 -0.39 -0.53 -0.41 -0.10 -0.12 0.01 0.07
                0 64 17 ERROR: "backward.c", line 421: Failed to align audio to trancript
                final state of the search is not reached
                ERROR: "baum_welch.c", line 324: me/file_1 ignored
                utt 0.003x 1.792e upd 0.003x 1.536e fwd 0.003x 1.472e bwd 0.000x 0.000e gau 0.0
                03x 0.960e rsts 0.000x 0.000e rstf 0.000x 0.000e rstu 0.000x 0.000e
                utt> 1 file_2 299INFO: cmn.c(175): CMN: 66.97 -1.49 1.1
                5 0.31 0.05 -0.51 -0.53 -0.73 -0.26 -0.17 -0.13 0.12 -0.13
                0 52 17 ERROR: "backward.c", line 421: Failed to align audio to trancript
                final state of the search is not reached
                ERROR: "baum_welch.c", line 324: me/file_2 ignored
                utt 0.005x 1.280e upd 0.005x 1.024e fwd 0.005x 0.960e bwd 0.000x 0.000e gau 0.0
                00x 0.000e rsts 0.000x 0.000e rstf 0.000x 0.000e rstu 0.000x 0.000e

                What will be possible solution.
                I have checked your Stack Overflow post
                http://stackoverflow.com/questions/20233480/sphinx-4-failed-to-align-audio-to-trancript

                Is my audio file has problem?
                If yes then can you suggest me a tool which i can use to record my audio and also check my audio file properties like it is in 16KHz, Mono etc.

                Waiting for your help sir.

                 
  • Nickolay V. Shmyrev

    Is my audio file has problem?

    No idea, accidentally I can not access files on your computer.

    If yes then can you suggest me a tool which i can use to record my audio and also check my audio file properties like it is in 16KHz, Mono etc.

    audacity

     
  • Hasibul Haque

    Hasibul Haque - 2014-06-12

    Dear sir, Thanks for your continuous help.

    According to your suggestion I have downloaded the model from following location.
    http://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/US%20English%20Generic%20Acoustic%20Model/en-us.tar.gz/download

    Now I want to perform acoustic model adaption.
    I have recorder audio using AudaCity with 16K Mono.

    According to tutorial http://cmusphinx.sourceforge.net/wiki/tutorialadapt I have run following command for performing “Accumulating observation counts”

    Command:
    D:\acousticTrain\sphinxtrain\bin\Release\bw \
    -hmmdir hub4wsj_sc_8k \
    -moddeffn hub4wsj_sc_8k/mdef.txt \
    -ts2cbfn .cont. \
    -feat 1s_c_d_dd \
    -cmn current \
    -agc none \
    -dictfn hm3.dic \
    -ctlfn hm3_train.fileids \
    -lsnfn hm3_train.transcription \
    -accumdir .

    After executing above command I am getting following error
    utt> 0 file_1 240INFO: cmn.c(175): CMN: 75.18 0.60 0.7
    4 17.14 3.80 3.49 11.30 -1.66 0.34 -3.05 -0.32 -6.11 0.69
    0 64 30 ERROR: "backward.c", line 421: Failed to align audio to trancript
    final state of the search is not reached
    ERROR: "baum_welch.c", line 324: me/file_1 ignored
    utt 0.007x 1.792e upd 0.007x 1.536e fwd 0.007x 1.408e bwd 0.000x 0.000e gau 0.0
    07x 1.088e rsts 0.000x 0.000e rstf 0.000x 0.000e rstu 0.000x 0.000e
    utt> 1 file_2 258INFO: cmn.c(175): CMN: 77.39 -2.78 -4.6
    2 16.01 1.65 0.10 9.57 -3.79 -2.10 -2.72 2.50 -7.69 -1.64
    0 52 33 ERROR: "backward.c", line 421: Failed to align audio to trancript
    final state of the search is not reached
    ERROR: "baum_welch.c", line 324: me/file_2 ignored
    utt 0.006x 2.112e upd 0.006x 1.856e fwd 0.006x 1.728e bwd 0.000x 0.000e gau 0.0
    06x 1.216e rsts 0.000x 0.000e rstf 0.000x 0.000e rstu 0.000x 0.000e

    I have attached full output of my command.

    Need your help how I can solve this.
    Here is my full data with default model, my recording and transcript. (If you need)
    https://db.tt/TvbvYmdO

    Waiting for your help sir.

     
    • Nickolay V. Shmyrev

      For en-us you need to add -lda en-us/feature_transform to bw command line. Please read the documentation beforehand. This issue was also discussed on forum, please do the search.

       
  • Hasibul Haque

    Hasibul Haque - 2014-06-22

    Again thanks for your help.
    According to Tutorial "Adapting the default acoustic model"
    (http://cmusphinx.sourceforge.net/wiki/tutorialadapt)

    After performing adaption i will get following files in my adaption Folder

    mdef
    feat.params
    mixture_weights
    means
    noisedict
    transition_matrices
    variances

    But I am getting only following files

    means
    mixture_weights
    transition_matrices
    variances

    Is my adaption has any problem? (I didn't get any error while adaption)

    I am waiting for your help.

     
  • Nickolay V. Shmyrev

    But I am getting only following files

    You missed the step when you must copy original model files to new folder:

    cp -a hub4wsj_sc_8k hub4wsj_sc_8kadapt

     
  • Hasibul Haque

    Hasibul Haque - 2014-06-22

    Thanks sir.
    After performing Test using following command

    word_align.pl adaptation-test.transcription adapation-test.hyp

    I am getting output like following

    ------------- Output ---------------
    my name is hasibul (ME/FILE_1)
    my name is hasibul (ME/FILE_1)
    Words: 4 Correct: 4 Errors: 0 Percent correct = 100.00% Error = 0.00% Accuracy = 100.00%
    Insertions: 0 Deletions: 0 Substitutions: 0
    my name is anis (ME/FILE_2)
    my name is anis (ME/FILE_2)
    Words: 4 Correct: 4 Errors: 0 Percent correct = 100.00% Error = 0.00% Accuracy = 100.00%
    Insertions: 0 Deletions: 0 Substitutions: 0
    i am waiting for you (ME/FILE_3)
    i am waiting for you (ME/FILE_3)
    Words: 5 Correct: 5 Errors: 0 Percent correct = 100.00% Error = 0.00% Accuracy = 100.00%
    Insertions: 0 Deletions: 0 Substitutions: 0
    today is suny day (ME/FILE_4)
    today is suny day (ME/FILE_4)
    Words: 4 Correct: 4 Errors: 0 Percent correct = 100.00% Error = 0.00% Accuracy = 100.00%
    Insertions: 0 Deletions: 0 Substitutions: 0
    ...
    i need to complete twenty word (ME/FILE_9)
    i need to complete twenty word (ME/FILE_9)
    Words: 6 Correct: 6 Errors: 0 Percent correct = 100.00% Error = 0.00% Accuracy = 100.00%
    Insertions: 0 Deletions: 0 Substitutions: 0

    Use of uninitialized value $ref_uttid in hash element at D:\acousticTrain\sphinxtrain\scripts\decode\word_align.pl line 60, <ref> line 10.
    Use of uninitialized value $ref_uttid in concatenation (.) or string at D:\acousticTrain\sphinxtrain\scripts\decode\word_align.pl line 61, <ref> line 10.
    UttID is not ignored but it could not found in any entries of the hypothesis file on line3 10 UTTID:</ref></ref>

    ----------------- End ------------

    Here it is saying uninitialized value $ref_uttid in hash element.. Is there anything wrong or error.

    I am not getting output like
    TOTAL Words: 773 Correct: 669 Errors: 121
    TOTAL Percent correct = 86.55% Error = 15.65% Accuracy = 84.35%
    TOTAL Insertions: 17 Deletions: 11 Substitutions: 93

    As it is showing accuracy 100% for some of my examples. I have tried with my new adapted model but it cannot recognize the trained sentences correctly. I got better accuracy by default acoustic model. Is there anything error in my model adaption that's why it cannot recognize the sentences.

    Waiting for your help.

     
    • Nickolay V. Shmyrev

      I have tried with my new adapted model but it cannot recognize the trained sentences correctly. I got better accuracy by default acoustic model. Is there anything error in my model adaption that's why it cannot recognize the sentences.

      You need to provide the data to reproduce your problem to get help on this issue.

       
      • Hasibul Haque

        Hasibul Haque - 2014-06-23

        My Input data files with default acoustic model
        https://db.tt/X8TvDZET

        My input and output data files with default and adapted model
        https://db.tt/WaOVsrng

        I have used default acoustic model from following location
        http://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/US%20English%20Generic%20Acoustic%20Model/en-us.tar.gz/download

        Following are the steps I have used to adapt default acoustic model.

        Generating acoustic feature files
        D:\acousticTrain\sphinxbase\bin\Release\sphinx_fe -argfile en-us/feat.params -samprate 16000 -c hm3_train.fileids -di . -do . -ei wav -eo mfc -mswav yes

        Converting the mdef files
        D:\acousticTrain\sphinxtrain\bin\Release\pocketsphinx_mdef_convert.exe -text en-us/mdef en-us/mdef.txt

        Accumulating observation counts
        D:\acousticTrain\sphinxtrain\bin\Release\bw -hmmdir en-us -moddeffn en-us/mdef.txt -ts2cbfn .cont. -feat 1s_c_d_dd -cmn current -agc none -dictfn hm3.dic -ctlfn hm3_train.fileids -lsnfn hm3_train.transcription -accumdir . -lda en-us/feature_transform

        Creating transformation with MLLR
        D:\acousticTrain\sphinxtrain\bin\Release\mllr_solve.exe -meanfn en-us/means -varfn en-us/variances -outmllrfn mllr_matrix -accumdir .

        Performed copy from en-us to en-usadapt

        Updating the acoustic model files with MAP
        D:\acousticTrain\sphinxtrain\bin\Release\map_adapt -meanfn en-us/means -varfn en-us/variances -mixwfn en-us/mixture_weights -tmatfn en-us/transition_matrices -accumdir . -mapmeanfn en-usadapt/means -mapvarfn en-usadapt/variances -mapmixwfn en-usadapt/mixture_weights -maptmatfn en-usadapt/transition_matrices

        I have ignored the "Recreating the adapted sendump file" step

        Testing the adaptation
        D:\acousticTrain\sphinxtrain\bin\Release\pocketsphinx_batch -adcin yes -cepdir wav -cepext .wav -ctl hm3_test.fileids -lm hm3.lm -dict hm3.dic -hmm en-usadapt -hyp adapation-test.hyp
        D:\acousticTrain\sphinxtrain\scripts\decode\word_align.pl adaptation-test.transcription adapation-test.hyp

         
        • Nickolay V. Shmyrev

          Hello Hasibul

          I reviewed your data and files and don't see any issue. The updated model recognizes your test set perfectly. What is the issue you face?

           
      • Hasibul Haque

        Hasibul Haque - 2014-06-24

        Sir i am waiting for your response.

        I have added my input file and default acoustic model link as you said
        "You need to provide the data to reproduce your problem to get help on this issue."

        Hope you will help me.
        Again thanks for your help.

         

Log in to post a comment.

MongoDB Logo MongoDB