|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.linguist.acoustic.trivial.TrivialAcousticModel
Represents the generic interface to the Acoustic Model for sphinx4
Field Summary | |
static java.lang.String |
PROP_LEFT_CONTEXT_SIZE
Sphinx property that defines the left context size |
static int |
PROP_LEFT_CONTEXT_SIZE_DEFAULT
The default value for PROP_LEFT_CONTEXT_SIZE |
static java.lang.String |
PROP_RIGHT_CONTEXT_SIZE
Sphinx property that defines the right context size |
static int |
PROP_RIGHT_CONTEXT_SIZE_DEFAULT
The default value for PROP_RIGHT_CONTEXT_SIZE |
Fields inherited from interface edu.cmu.sphinx.linguist.acoustic.AcousticModel |
PROP_LOCATION, PROP_LOCATION_DEFAULT |
Constructor Summary | |
TrivialAcousticModel()
|
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 |
void |
initialize(java.lang.String name,
java.lang.String context)
Initializes this acoustic model |
HMM |
lookupNearestHMM(Unit unit,
HMMPosition position,
boolean exactMatch)
Given a unit, returns the HMM that best matches the given unit. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PROP_LEFT_CONTEXT_SIZE
public static final int PROP_LEFT_CONTEXT_SIZE_DEFAULT
public static final java.lang.String PROP_RIGHT_CONTEXT_SIZE
public static final int PROP_RIGHT_CONTEXT_SIZE_DEFAULT
Constructor Detail |
public TrivialAcousticModel()
Method Detail |
public void initialize(java.lang.String name, java.lang.String context) throws java.io.IOException
name
- the name of this acoustic modelcontext
- the context for this acoustic model
java.io.IOException
- if the model could not be loadedpublic java.lang.String getName()
getName
in interface AcousticModel
public java.util.Properties getProperties()
getProperties
in interface AcousticModel
public HMM lookupNearestHMM(Unit unit, HMMPosition position, boolean exactMatch)
lookupNearestHMM
in interface AcousticModel
unit
- the unit of interestposition
- the position of the unit of interestexactMatch
- if true, only an exact match is
acceptable.
public java.util.Iterator getHMMIterator()
getHMMIterator
in interface AcousticModel
HMM
.public java.util.Iterator getContextIndependentUnitIterator()
getContextIndependentUnitIterator
in interface AcousticModel
Unit
public int getLeftContextSize()
getLeftContextSize
in interface AcousticModel
public int getRightContextSize()
getRightContextSize
in interface AcousticModel
public void allocate() throws java.io.IOException
AcousticModel
allocate
in interface AcousticModel
java.io.IOException
- if the model could not be loadedpublic void deallocate()
AcousticModel
deallocate
in interface AcousticModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |