next up previous contents index
Next: 9.2 Constructing Context-Dependent Models Up: 9 HMM System Refinement Previous: 9 HMM System Refinement

9.1 Using HHED

 

The HMM editor HHED takes as input a set of HMM definitions and outputs a new modified set, usually to a new directory. It is invoked by a command line of the form

    HHEd -H MMF1 -H MMF2 ... -M newdir cmds.hed hmmlist
where cmds.hed is an edit script containing a list of edit commands. Each command is written on a separate line and begins with a 2 letter command name.  

The effect of executing the above command line would be to read in the HMMs listed in hmmlist and defined by files MMF1, MMF2, etc., apply the editing operations defined in cmds.hed and then write the resulting system out to the directory newdir. As with all tools, HTK will attempt to replicate the file structure of the input in the output directory. By default, any new macros generated by HHED will be written to one or more of the existing MMFs. In doing this, HTK will attempt to ensure that the ``definition before use'' rule for macros is preserved, but it cannot always guarantee this. Hence, it is usually best to define explicit target file names for new macros. This can be done in two ways. Firstly, explicit target file names can be given in the edit script using the UF  command. For example, if cmds.hed contained

   ....
   UF smacs
   # commands to generate state macros
   ....
   UF vmacs
   # commands to generate variance macros
   ....
then the output directory would contain an MMF called smacs containing a set of state macro definitions and an MMF called vmacs containing a set of variance macro definitions, these would be in addition to the existing MMF files MMF1, MMF2, etc.

Alternatively, the whole HMM system can be written to a single file using the -w option. For example,

    HHEd -H MMF1 -H MMF2 ... -w newMMF cmds.hed hmmlist
would write the whole of the edited HMM set to the file newMMF.

  As mentioned previously, each execution of HHED is normally followed by re-estimation using HEREST. Normally, all the information needed by HHED is contained in the model set itself. However, some clustering operations require various statistics about the training data (see sections 9.4 and 9.5). These statistics are gathered by HEREST  and output to a stats file, which is then read in by HHED. Note, however, that the statistics file  generated by HEREST refers to the input model set not the re-estimated set. Thus for example, in the following sequence, the HHED edit script in cmds.hed contains a command (see the RO command  in section 9.4) which references a statistics file (called stats) describing the HMM set defined by hmm1/MMF.

    HERest -H hmm1/MMF -M hmmx -s stats hmmlist train1 train2 ....
    HHEd -H hmm1/MMF -M hmm2 cmds.hed hmmlist
The required statistics file is generated by HEREST but the re-estimated model set stored in hmmx/MMF is ignored and can be deleted.


next up previous contents index
Next: 9.2 Constructing Context-Dependent Models Up: 9 HMM System Refinement Previous: 9 HMM System Refinement

ECRL HTK_V2.1: email [email protected]