edu.cmu.sphinx.linguist.acoustic
Interface AcousticModel

All Known Implementing Classes:
Model, Model, Model, TiedStateAcousticModel, TrivialAcousticModel

public interface AcousticModel

Represents the generic interface to the Acoustic Model for sphinx4


Field Summary
static java.lang.String PROP_LOCATION
          The directory where the acoustic model data can be found.
static java.lang.String PROP_LOCATION_DEFAULT
          The default value of PROP_LOCATION.
 
Method Summary
 void allocate()
          Gets this acoustic model ready to use, allocating all necessary resources.
 void deallocate()
          Deallocates previously allcoated resources
 java.util.Iterator getContextIndependentUnitIterator()
          Returns an iterator that can be used to iterate through all the CI units in the acoustic model
 java.util.Iterator getHMMIterator()
          Returns an iterator that can be used to iterate through all the HMMs of the acoustic model
 int getLeftContextSize()
          Returns the size of the left context for context dependent units
 java.lang.String getName()
          Returns the name of this AcousticModel, or null if it has no name.
 java.util.Properties getProperties()
          Returns the properties of this acoustic model.
 int getRightContextSize()
          Returns the size of the right context for context dependent units
 HMM lookupNearestHMM(Unit unit, HMMPosition position, boolean exactMatch)
          Given a unit, returns the HMM that best matches the given unit.
 

Field Detail

PROP_LOCATION

public static final java.lang.String PROP_LOCATION
The directory where the acoustic model data can be found.

See Also:
Constant Field Values

PROP_LOCATION_DEFAULT

public static final java.lang.String PROP_LOCATION_DEFAULT
The default value of PROP_LOCATION.

See Also:
Constant Field Values
Method Detail

allocate

public void allocate()
              throws java.io.IOException
Gets this acoustic model ready to use, allocating all necessary resources.

Throws:
java.io.IOException - if the model could not be loaded

deallocate

public void deallocate()
Deallocates previously allcoated resources


getName

public java.lang.String getName()
Returns the name of this AcousticModel, or null if it has no name.

Returns:
the name of this AcousticModel, or null if it has no name

lookupNearestHMM

public HMM lookupNearestHMM(Unit unit,
                            HMMPosition position,
                            boolean exactMatch)
Given a unit, returns the HMM that best matches the given unit. If exactMatch is false and an exact match is not found, then different word positions are used. If any of the contexts are non-silence filler units. a silence filler unit is tried instead.

Parameters:
unit - the unit of interest
position - the position of the unit of interest
exactMatch - if true, only an exact match is acceptable.
Returns:
the HMM that best matches, or null if no match could be found.

getHMMIterator

public java.util.Iterator getHMMIterator()
Returns an iterator that can be used to iterate through all the HMMs of the acoustic model

Returns:
an iterator that can be used to iterate through all HMMs in the model. The iterator returns objects of type HMM.

getContextIndependentUnitIterator

public java.util.Iterator getContextIndependentUnitIterator()
Returns an iterator that can be used to iterate through all the CI units in the acoustic model

Returns:
an iterator that can be used to iterate through all CI units. The iterator returns objects of type Unit

getLeftContextSize

public int getLeftContextSize()
Returns the size of the left context for context dependent units

Returns:
the left context size

getRightContextSize

public int getRightContextSize()
Returns the size of the right context for context dependent units

Returns:
the left context size

getProperties

public java.util.Properties getProperties()
Returns the properties of this acoustic model.

Returns:
the properties of this acoustic model