SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
spr_hmmshake.c File Reference

Reorder the states in an HMM. More...

Detailed Description

Reorder the states in an HMM.

spr_hmmshake <-i hmm_file> [-gi mvg_file] [-seli sel_file] [-u unit_fname] [-am_opt acmod_opt]
    [-o hmm_file] [-go hmm_file] [-selo sel_file] [-nu unit_fname]
Parameters
-i<em>hmm_file</em><aname="spr_hmmshake.i" class="el">
HMM-file to read.
-gi<em>mvg_file</em><aname="spr_hmmshake.gi" class="el">
MVG-file to read. If specified, this MVG file is read instead of the MVG file given in the header of the input HMM.
-seli<em>sel_file</em><aname="spr_hmmshake.seli" class="el">
SEL-file to read. If specified, this SELECT file is read instead of the SELECT file given in the header of the input HMM.
-u<em>unit_fname</em><aname="spr_hmmshake.u" class="el">
UNIT-file to read. If specified, this unit file is used to read the input HMM instead of the file corresponding to the filename in the header of the input HMM.
-am_opt<em>acmod_opt</em><aname="spr_hmmshake.am_opt" class="el">
Extra options for loading the acoustic model.
-o<em>hmm_file</em><aname="spr_hmmshake.o" class="el">
HMM-file to write to. If not specified, the input HMM will be overwritten.
-go<em>hmm_file</em><aname="spr_hmmshake.go" class="el">
MVG-file to write to. By default the input mvg file will be overwritten.
-selo<em>sel_file</em><aname="spr_hmmshake.selo" class="el">
SEL-file to write to. By default is input sel file will be overwritten.
-nu<em>unit_fname</em><aname="spr_hmmshake.nu" class="el">
Specify a new unit file to write the units to (or as input for rearanging the existing units).

Reorder the states in an HMM. Change the sequence of the states in the input HMM file according to a new unit file, given with -nu. For each unit in the new unit file, the unit with the same spelling in the old unit file (with which the input HMM file is read), is searched for and is copied. Simply the unit name is checked, so the number of states (or the state numbers) can differ between old and new unit. Therefore the corrected file with new units is printed to the new unit file (again option -nu). If there is no old unit with the same spelling, new states for the new unit are added, filled in with uniform probabilities for the HMM file, with mvgs with zero mean and unit sigma for mvgs in CD_HMM cases, and with selection of the first gaussian for reduced SC_HMMs (the last is strange !!!).

Revision History:
03/94, JD
creation
04/94, JD
adapted for continuous densities; .mvg file is adapted along with the .hmm in CD_HMM cases.
08/94, JD
adapted for selection of gaussians per state (SC_HMM)
01/96, JD
adapted for new structures in hmm60; added hmmprint, hmmd2c and hmmc2d from separate programs
07/97, JD
rewritten for extended hmm structures (state-variable mixture dimension, linear or logarithmic probabilities in HMM, ...)
08/97, JD
adapted for Gndx state2mvg indexing type