wiki:CompilingHTK

Version 2 (modified by marcela_charfuelan, 17 years ago) (diff)

--

Note on compiling HTK

Before the "make all" step we have made some small changes in the code for being able to handle longer context feature names. We have made changes in: HTKLib/HShell.h, HTKLib/HUtil.c and HTKTools/HHEd.c.

These changes are:

  • in HTKLib/HShell.h
      line 120:  #define MAXSTRLEN 256    /* max length of a string */ 
      changed to:
                 #define MAXSTRLEN 2048   /* max length of a string */ 
    
  • in HTKLib/HUtil.c
      line 1422:  char hname[256];
      changed to:
                  char hname[MAXSTRLEN];
    
  • in HTKTools/HHEd.c
      line 329:  CreateHeap(&hmmHeap,"Model Heap",MSTAK,1,1.0,40000,400000);
      changed to:
                 CreateHeap(&hmmHeap,"Model Heap",MSTAK,1,1.0,40000,1600000);
    
      line 8103:  CreateHeap(&questHeap,"Question Heap",MSTAK,1,1.0,8000,16000);
      changed to:
                  CreateHeap(&questHeap,"Question Heap",MSTAK,1,1.0,8000,200000);
    
      line 8104:  CreateHeap(&tmpHeap,"Temporary Heap",MSTAK,1,1.0,40000,400000);
      changed to:
                  CreateHeap(&tmpHeap,"Temporary Heap",MSTAK,1,1.0,40000,1600000);
    


We have made another small change in the hts_engine/hts_engine.cpp for being able to use phoneme names like r=, (if you will not use the hts_engine you do not need to change this).

  • in /hts_engine/hts_engine.cpp
      line 359:  if (!isalnum(buf[0])) break;
      changed to:
                 if (!isgraph(buf[0])) break;
    

After these changes you can continue as normal with "make all" and "make install".