public class TrainerAcousticModel extends TiedStateAcousticModel
Modifier and Type | Field and Description |
---|---|
static int |
ALL_MODELS
Flag indicating all models should be operated on.
|
static java.lang.String |
PROP_FORMAT_SAVE
The save format for the acoustic model data.
|
static java.lang.String |
PROP_MC_FLOOR
Mixture component score floor.
|
static java.lang.String |
PROP_MW_FLOOR
Mixture weight floor.
|
static java.lang.String |
PROP_VARIANCE_FLOOR |
java.lang.String |
saveFormat |
static java.lang.String |
SAVER |
loader, logger, name, PROP_LOADER, PROP_UNIT_MANAGER, PROP_USE_COMPOSITES, unitManager
PROP_LOCATION
Constructor and Description |
---|
TrainerAcousticModel() |
TrainerAcousticModel(Loader loader,
UnitManager unitManager,
boolean useComposites,
Saver saver,
java.lang.String saveFormat) |
Modifier and Type | Method and Description |
---|---|
void |
accumulate(int index,
TrainerScore[] trainerScore)
Accumulate the current TrainerScore into the buffers.
|
void |
accumulate(int index,
TrainerScore[] trainerScore,
TrainerScore[] nextTrainerScore)
Accumulate the current TrainerScore into the buffers.
|
void |
load()
Loads the acoustic models.
|
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured.
|
float |
normalize()
Normalize the buffers and update the models.
|
void |
resetBuffers()
Resets the buffers.
|
void |
save(java.lang.String name)
Saves the acoustic model with a given name and format
|
void |
updateLogLikelihood()
Update the log likelihood.
|
allocate, deallocate, getCompositeSenoneSequence, getContextIndependentUnitIterator, getHMMIterator, getLeftContextSize, getName, getProperties, getRightContextSize, getSenone, logInfo, lookupNearestHMM
@S4Component(type=Saver.class) public static final java.lang.String SAVER
@S4Double(defaultValue=9.999999747378752E-5) public static final java.lang.String PROP_VARIANCE_FLOOR
@S4Double(defaultValue=0.0) public static final java.lang.String PROP_MC_FLOOR
@S4Double(defaultValue=1.0000000116860974E-7) public static final java.lang.String PROP_MW_FLOOR
@S4String(defaultValue="sphinx3.binary") public static final java.lang.String PROP_FORMAT_SAVE
public java.lang.String saveFormat
public static final int ALL_MODELS
public TrainerAcousticModel(Loader loader, UnitManager unitManager, boolean useComposites, Saver saver, java.lang.String saveFormat) throws java.io.IOException
java.io.IOException
public TrainerAcousticModel()
public void newProperties(PropertySheet ps) throws PropertyException
Configurable
newProperties
in interface Configurable
newProperties
in class TiedStateAcousticModel
ps
- a property sheet holding the new dataPropertyException
- if there is a problem with the properties.public void save(java.lang.String name) throws java.io.IOException
name
- the name of the acoustic modeljava.io.IOException
- if the model could not be loadedjava.io.FileNotFoundException
- if the model does not existpublic void load() throws java.io.IOException, java.io.FileNotFoundException
java.io.IOException
- if the model could not be loadedjava.io.FileNotFoundException
- if the model does not existpublic void resetBuffers()
public void accumulate(int index, TrainerScore[] trainerScore, TrainerScore[] nextTrainerScore)
index
- the current index into the TrainerScore vectortrainerScore
- the TrainerScore in the current framenextTrainerScore
- the TrainerScore in the next framepublic void accumulate(int index, TrainerScore[] trainerScore)
index
- the current index into the TrainerScore vectortrainerScore
- the TrainerScorepublic void updateLogLikelihood()
public float normalize()