marytts.modules
Class PolynomialF0Modeller
java.lang.Object
marytts.modules.InternalModule
marytts.modules.PolynomialF0Modeller
- All Implemented Interfaces:
- MaryModule
public class PolynomialF0Modeller
- extends InternalModule
Predict f0 contours using polynomial curves predicted from a directed graph per syllable.
- Author:
- Marc Schröder
|
Constructor Summary |
protected |
PolynomialF0Modeller(java.util.Locale locale,
java.lang.String propertyPrefix,
FeatureProcessorManager featureProcessorManager)
Constructor to be called with instantiated objects. |
|
PolynomialF0Modeller(java.lang.String locale,
java.lang.String propertyPrefix,
java.lang.String featprocClassInfo)
Constructor which can be directly called from init info in the config file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
contourFeatures
protected FeatureFileReader contourFeatures
contourGraph
protected DirectedGraph contourGraph
featureComputer
protected TargetFeatureComputer featureComputer
PolynomialF0Modeller
public PolynomialF0Modeller(java.lang.String locale,
java.lang.String propertyPrefix,
java.lang.String featprocClassInfo)
throws java.lang.Exception
- Constructor which can be directly called from init info in the config file.
Different languages can call this code with different settings.
- Parameters:
locale - a locale string, e.g. "en"propertyPrefix - the prefix to be used when looking up entries in the config files, e.g. "english.f0"featprocClass - a package name for an instance of FeatureProcessorManager, e.g. "marytts.language.en.FeatureProcessorManager"
- Throws:
java.lang.Exception
PolynomialF0Modeller
protected PolynomialF0Modeller(java.util.Locale locale,
java.lang.String propertyPrefix,
FeatureProcessorManager featureProcessorManager)
- Constructor to be called with instantiated objects.
- Parameters:
locale - propertyPrefix - the prefix to be used when looking up entries in the config files, e.g. "english.f0"
startup
public void startup()
throws java.lang.Exception
- Description copied from interface:
MaryModule
- Allow the module to start up, performing whatever is necessary
to become operational. After successful completion, getState()
should return MODULE_RUNNING.
- Specified by:
startup in interface MaryModule- Overrides:
startup in class InternalModule
- Throws:
java.lang.Exception
process
public MaryData process(MaryData d)
throws java.lang.Exception
- Description copied from class:
InternalModule
- Perform this module's processing on abstract "MaryData" input
d.
Subclasses need to make sure that the process()
method is thread-safe, because in server-mode,
it will be called from different threads at the same time.
A sensible way to do this seems to be not to use any
global or static variables, or to use them read-only.
- Specified by:
process in interface MaryModule- Overrides:
process in class InternalModule
- Returns:
- A MaryData object of type
outputType() encapsulating the processing result.
This method just returns its input. Subclasses should override this.
- Throws:
java.lang.Exception
getMeanContour
protected double[] getMeanContour(FeatureFileReader currentContours,
int[] contourIDs)