Wednesday, July 30, 2008

HTK rundemo

After I have successfully installed the HTK 3.4 in cygwin environment, I follow the instructions in the README and run the instruction
./runDemo configs/monPlainM1S1.dcf
But I don't get the following results,
(雖然成功安裝了HTK3.4在cygwin上,可是按照HTKDemo裡面的說明執行
./runDemo configs/monPlainM1S1.dcf
沒有跑出)
On the training set:
------------------------ Overall Results --------------------------
SENT: %Correct=0.00 [H=0, S=7, N=7]
WORD: %Corr=77.63, Acc=74.89 [H=170, D=37, S=12, I=6, N=219]
===================================================================

On the test set:
------------------------ Overall Results --------------------------
SENT: %Correct=0.00 [H=0, S=3, N=3]
WORD: %Corr=63.91, Acc=59.40 [H=85, D=35, S=13, I=6, N=133]
===================================================================
Instead I get the error messages,
(反而跑出)
Can't open proto at ./MakeProtoHMMSet line 101, <> line 21.
Can't open hmms/hmm.0
I check the README. I found that I don't have the folder "hmms" and "proto" under the HTKDemo. So I create the folder "proto" then run the instruction once again, and then I pass the first error message. Because the instruction "./MakeProtoHMMSet" will create five files, S, C V,N, and L under the "proto" after read the file "lists/bcplist/hmmlist".
(看了readme,發現我根本沒有hmms資料夾和proto資料夾在HTKDemo下,
所以自己建立了proto資料夾後,就順利過了第一個錯誤。
並在proto資料夾產生S, C, V, N, L五個檔案。
因為./MakeProtoHMMSet參考了lists/bcplist這個hmmlist。)

Therefore, for successfully running the demo, I have to create the following folder manually.
(所以,在HTKDemo總共要產生以下資料夾,)
HTKDemo/hmms/ (給HRest用)
HTKDemo/test/ (給HVite用)
HTKDemo/proto/ (給./MakeProtoHMMSet用)
and then,
<然後是>
HTKDemo/hmms/hmm.0/ (給HInit用)
HTKDemo/hmms/hmm.1/ (給HRest用)
HTKDemo/hmms/hmm.2/ (給HRest,HVite用)
Finally, the correct demo message is avaiable.
(如此一來,就可順利得到./runDemo configs/monPlainM1S1.dcf的正確結果。)

16 comments:

  1. if running the ./runDemo configs/monPlainM1S1.dcf is failure,
    error message is bad interpreter.
    Please update the perl package for cygwin.

    Devel: perc:Perl-Compatible Regular Expressions
    Devel: perc-devel:Perl-Compatible Regular Expressions
    Devel: perl-ExtUtils-Depends
    Devel: perl-ExtUtils-pkgConfig
    Devel: pkg-config:A utility used...

    It should be working.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Thanks for your solution, work like a charm, and save some hours of work.

    ReplyDelete
  4. Here is the Japanese version of notes of running rundemo of HTK.
    http://blog.yusukekondo.com/?eid=586128

    ReplyDelete
  5. thank you very much :)

    ReplyDelete
  6. Thanks...quick and easy solution

    ReplyDelete
  7. I've already create hmms, test,proto.....but i have error :
    Writing HMMDef to proto/S
    Writing HMMDef to proto/C
    Writing HMMDef to proto/V
    Writing HMMDef to proto/N
    Writing HMMDef to proto/L


    Calling HInit for HMM S
    sh: HInit: not found


    Calling HInit for HMM C
    sh: HInit: not found


    Calling HInit for HMM V
    sh: HInit: not found


    Calling HInit for HMM N
    sh: HInit: not found


    Calling HInit for HMM L
    sh: HInit: not found
    Source Directory Empty hmms/hmm.0
    What can i solve it?

    ReplyDelete
  8. To anonymous: I don't know what problem you got. I didn't involve in HTK for a long long time. But I will reinstall all related resource and try to do again.

    ReplyDelete
  9. hello JR.Gemimi !
    I installing successfull HTK3.4, but i run HTKDemo, i received some error follow:
    HTK Configuration Parameters[3]
    Module/Tool Parameter Value
    # KEEPDISTINCT FALSE
    # SAVEGLOBOPTS TRUE
    # TARGETKIND MFCC_E_D

    ERROR [+5010] InitSource: Cannot open source file proto/L
    ERROR [+7010] LoadHMMSet: Can't find file
    ERROR [+2128] Initialise: LoadHMMSet failed
    FATAL ERROR - Terminating program HInit

    ReplyDelete
  10. Sorry for my late. Maybe you have solved your problem.

    1. Make sure the file proto/L exist.
    2. Make sure the authority is right.

    Others error may be caused by this error.

    Try and good luck.

    ReplyDelete
  11. Thanks JR.Gemini,

    your post was very helpful!!

    Xie xie ni!

    ReplyDelete
  12. To Ukio, I am glad to help u. I just left the notes when I tired it. It's powerful and have u good experience with it.

    ReplyDelete
  13. I've already create hmms, test,proto.....but i have error :
    Writing HMMDef to proto/S
    Writing HMMDef to proto/C
    Writing HMMDef to proto/V
    Writing HMMDef to proto/N
    Writing HMMDef to proto/L


    Calling HInit for HMM S
    sh: HInit: not found


    Calling HInit for HMM C
    sh: HInit: not found


    Calling HInit for HMM V
    sh: HInit: not found


    Calling HInit for HMM N
    sh: HInit: not found


    Calling HInit for HMM L
    sh: HInit: not found
    Source Directory Empty hmms/hmm.0
    What can i solve it?

    ReplyDelete
  14. if running ./runDemo configs/monPlainM1S3.dcf msg is
    bash: ./runDemo: Permission denied
    what can i do?

    ReplyDelete
  15. Please check the permission of binary runDemo.

    Using chmod to change the permission of a file.

    ReplyDelete
  16. Thanks for the post. Also don't miss to create the folder "tmp" inside hmm.

    HTKDemo/hmm/tmp

    ReplyDelete