The CTK Development Page


HMM decoders will not parse HTK HMM files that only use one mixture.

Single mixture models generate the following error:

HMM::read_file unknown keyword <Mean>
CTK EXCEPTION CAUGHT BY DEFAULT HANDLER
ctk_HMM.cpp (38): (GCE) General CTK Error:

Here is a temporary workaround for CTK versions earlier than v1.1.

The problem is that single mixture models do not employ the <Mixture> tag, but the model file parser expects to see this after the <State> tag, i.e single mixture models have the form:

<BeginHMM>
<NumStates> 10 <StreamInfo> 1 128 <VecSize> 128
<DIAGC> <NULLD> <FBANK_D>
<State> 2
<Mean> 128
.....

whereas, for multiple mixtures, the form is:

<BeginHMM>
<NumStates> 10 <StreamInfo> 1 128 <VecSize> 128
<DIAGC> <NULLD> <FBANK_D>
<State> 2
<NumMixes> 2
<Mixture> 1 5.437802e-01
<Mean> 128
.....

This bug will be fixed in CTKv1.1. Until then it is possible to work around it by writing single mixture HMM files as:

<BeginHMM>
<NumStates> 10 <StreamInfo> 1 128 <VecSize> 128
<DIAGC> <NULLD> <FBANK_D>
<State> 2
<NumMixes> 1
<Mixture> 1 1.0
etc

i.e. a single mixture of weight 1.0. If the models have been generated by HTK then this will require some hand editting.