|
|||||||||
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
public class TrivialAcousticModel
Represents the generic interface to the Acoustic Model for sphinx4
Field Summary | |
---|---|
static java.lang.String |
LEFT_CONTEXT_SIZE
Sphinx property that defines the left context size |
static java.lang.String |
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<Unit> |
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. |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@S4Integer(defaultValue=1) public static final java.lang.String LEFT_CONTEXT_SIZE
@S4Integer(defaultValue=1) public static final java.lang.String RIGHT_CONTEXT_SIZE
Constructor Detail |
---|
public TrivialAcousticModel()
Method Detail |
---|
public void newProperties(PropertySheet ps) throws PropertyException
Configurable
newProperties
in interface Configurable
ps
- a property sheet holding the new data
PropertyException
- if there is a problem with the properties.public 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<Unit> 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 |