public class HMMModel extends Model
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
logger |
applyTo, dataStream, featureComputer, featureManager, featureName, predictFrom, predictionFeatureNames, targetAttributeFormat, targetAttributeName, voiceName
Constructor and Description |
---|
HMMModel(FeatureProcessorManager featureManager,
String voiceName,
InputStream dataStream,
String targetAttributeName,
String targetAttributeFormat,
String featureName,
String predictFrom,
String applyTo)
Model constructor
|
Modifier and Type | Method and Description |
---|---|
void |
applyFromTo(List<Element> predictFromElements,
List<Element> applyToElements)
Predict F0 for the list of elements and apply to another list of elements.
|
void |
applyTo(List<Element> elements)
Predict duration for the list of elements.
|
protected float |
evaluate(Target target)
Apply the HMM to a Target to get its predicted value, this method is not used in HMMModel.
|
protected void |
loadData()
Load trees and pdfs, from HMM configuration file.
|
void |
setPredictDurAndF0(boolean bval)
This variable is set to true whenever the same HMMModel is used to predict both duration and F0.
|
getApplyTo, getFeatureName, getPredictFrom, getTargetAttributeName, getTargets, getVoiceName, load, setupFeatureComputer
public HMMModel(FeatureProcessorManager featureManager, String voiceName, InputStream dataStream, String targetAttributeName, String targetAttributeFormat, String featureName, String predictFrom, String applyTo) throws MaryConfigurationException
featureManager
- the feature processor manager used to compute the symbolic features used for predictionvoiceName
- in HMM models this data file corresponds to the configuration file of the HMM voicedataStream
- dataStreamtargetAttributeName
- attribute in MARYXML to predicttargetAttributeFormat
- print style, not used in HMM modelsfeatureName
- not used in HMMModelpredictFrom
- not used in HMMModelapplyTo
- not used in HMMModelMaryConfigurationException
- if there are missing files or problems loading trees and pdf files.public void setPredictDurAndF0(boolean bval)
bval
- bvalprotected void loadData() throws IOException, MaryConfigurationException
loadData
in class Model
MaryConfigurationException
- if there are missing files or problems loading trees and pdf files.IOException
- if any files cannot be properly readpublic void applyTo(List<Element> elements) throws MaryConfigurationException
applyTo
in class Model
elements
- elements from MaryXML for which to predict the valuesMaryConfigurationException
- if error searching in HMM trees.public void applyFromTo(List<Element> predictFromElements, List<Element> applyToElements) throws MaryConfigurationException
applyFromTo
in class Model
predictFromElements
- elements from MaryXML for which to predict the valuesapplyToElements
- elements from MaryXML for which to apply the predicted valuesMaryConfigurationException
- if error searching in HMM trees.protected float evaluate(Target target)
evaluate
in class Model
target
- targetRuntimeException
- if this method is called.Copyright © 2000–2016 DFKI GmbH. All rights reserved.