|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.model.acoustic.WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.Model
Loads a tied-state acoustic model generated by the Sphinx-3 trainer.
It is not the goal of this documentation to provide an explanation about the concept of HMMs. The explanation below is superficial, and provided only in a way that the files in the acoustic model package make sense.
An HMM models a process using a sequence of states. Associated with each state, there is a probability density function. A popular choice for this function is a Gaussian mixture, that is, a summation of Gaussians. As you may recall, a single Gaussian is defined by a mean and a variance, or, in the case of a multidimensional Gaussian, by a mean vector and a covariance matrix, or, under some simplifying assumptions, a variance vector. The "means" and "variances" files in the "continuous" directory contain exactly this: a table in which each line contains a mean vector or a variance vector respectively. The dimension of these vectors is the same as the incoming data, the encoded speech signal. The Gaussian mixture is a summation of Gaussians, with different weights for different Gaussians. The "mixture_weights" file contains this: each line contains the weights for a combination of Gaussians.
The HMM is a model with a set of states. The transitions between states have an associated probability. These probabilities make up the transition matrices stored in the "transition_matrices" file.
The files in the "continuous" directory are, therefore, tables, or pools, of means, variances, mixture weights, and transition probabilities.
The dictionary is a file that maps words to their phonetic transcriptions, that is, it maps words to sequences of phonemes.
The language model contains information about probabilities of words in a language. These probabilities could be for individual words or for sequences of two or three words.
The model definition file in a way ties everything together. If the recognition system models phonemes, there is an HMM for each phoneme. The model definition file has one line for each phoneme. The phoneme could be in a context dependent or independent. Each line, therefore, identifies a unique HMM. This line has the phoneme identification, the non-required left or right context, the index of a transition matrix, and, for each state, the index of a mean vector, a variance vector, and a set of mixture weights.
Field Summary | |
static java.lang.String |
PROP_LOADER
The property that defines the component used to load the acoustic model |
static java.lang.String |
PROP_UNIT_MANAGER
The property that defines the unit manager |
static java.lang.String |
PROP_USE_COMPOSITES
Controls whether we generate composites or CI units when no context is given during a lookup. |
static boolean |
PROP_USE_COMPOSITES_DEFAULT
The default value of PROP_USE_COMPOSITES. |
Fields inherited from interface edu.cmu.sphinx.linguist.acoustic.AcousticModel |
PROP_LOCATION, PROP_LOCATION_DEFAULT |
Constructor Summary | |
Model()
|
Method Summary | |
void |
allocate()
initialize this acoustic model with the given name and context. |
void |
deallocate()
Deallocates previously allcoated resources |
SenoneSequence |
getCompositeSenoneSequence(Unit unit,
HMMPosition position)
Get a composite senone sequence given the unit The unit should have a LeftRightContext, where one or two of 'left' or 'right' may be null to indicate that the match should succeed on any context. |
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. |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component has new data. |
void |
register(java.lang.String name,
Registry registry)
Register my properties. |
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_LOADER
public static final java.lang.String PROP_UNIT_MANAGER
public static final java.lang.String PROP_USE_COMPOSITES
public static final boolean PROP_USE_COMPOSITES_DEFAULT
Constructor Detail |
public Model()
Method Detail |
public void register(java.lang.String name, Registry registry) throws PropertyException
Configurable
register
in interface Configurable
name
- the name of the componentregistry
- the registry for this component
PropertyException
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 void allocate() throws java.io.IOException
allocate
in interface AcousticModel
java.io.IOException
- if the model could not be loadedpublic void deallocate()
AcousticModel
deallocate
in interface AcousticModel
public java.lang.String getName()
getName
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 SenoneSequence getCompositeSenoneSequence(Unit unit, HMMPosition position)
unit
- the unitpublic int getLeftContextSize()
getLeftContextSize
in interface AcousticModel
public int getRightContextSize()
getRightContextSize
in interface AcousticModel
public java.util.Properties getProperties()
getProperties
in interface AcousticModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |