public class TrivialAcousticModel extends java.lang.Object implements AcousticModel
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LEFT_CONTEXT_SIZE
Defines the left context size
|
static java.lang.String |
RIGHT_CONTEXT_SIZE |
PROP_LOCATION| Constructor and Description |
|---|
TrivialAcousticModel() |
TrivialAcousticModel(int leftContextSize,
int rightContextSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
allocate()
Gets this acoustic model ready to use, allocating all necessary resources.
|
void |
deallocate()
Deallocates previously allocated 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<HMM> |
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.
|
@S4Integer(defaultValue=1) public static final java.lang.String LEFT_CONTEXT_SIZE
@S4Integer(defaultValue=1) public static final java.lang.String RIGHT_CONTEXT_SIZE
public TrivialAcousticModel(int leftContextSize,
int rightContextSize)
public TrivialAcousticModel()
public void newProperties(PropertySheet ps) throws PropertyException
ConfigurablenewProperties in interface Configurableps - a property sheet holding the new dataPropertyException - if there is a problem with the properties.public java.lang.String getName()
getName in interface AcousticModelpublic java.util.Properties getProperties()
getProperties in interface AcousticModelpublic HMM lookupNearestHMM(Unit unit, HMMPosition position, boolean exactMatch)
lookupNearestHMM in interface AcousticModelunit - the unit of interestposition - the position of the unit of interestexactMatch - if true, only an exact match is acceptable.public java.util.Iterator<HMM> getHMMIterator()
getHMMIterator in interface AcousticModelHMM.public java.util.Iterator<Unit> getContextIndependentUnitIterator()
getContextIndependentUnitIterator in interface AcousticModelUnitpublic int getLeftContextSize()
getLeftContextSize in interface AcousticModelpublic int getRightContextSize()
getRightContextSize in interface AcousticModelpublic void allocate()
throws java.io.IOException
AcousticModelallocate in interface AcousticModeljava.io.IOException - if the model could not be loadedpublic void deallocate()
AcousticModeldeallocate in interface AcousticModel