Package com.sun.speech.freetts.en
Class ContourGenerator
java.lang.Object
com.sun.speech.freetts.en.ContourGenerator
- All Implemented Interfaces:
UtteranceProcessor
Calculates the F0 curve for an utterance based on the Black and
Hunt article "Generating F0 Contours from ToBI Labels Using Linear
Regression," ICSLP96, vol. 3, pp 1385-1388, Philadelphia,
PA. 1996.
-
Constructor Summary
ConstructorsConstructorDescriptionContourGenerator(URL url, float modelMean, float modelStddev) Creates a ContourGenerator utterance processor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidparseAndAdd(List list, String line) Parses the line into an F0ModelTerm.voidprocessUtterance(Utterance utterance) Generates the F0 contour for the utterance.toString()Returns the string representation of the object.
-
Constructor Details
-
ContourGenerator
Creates a ContourGenerator utterance processor.- Parameters:
url- source of the datamodelMean- the average frequencymodelStddev- the std deviation of the frequency- Throws:
IOException- if an error occurs while loading data
-
-
Method Details
-
processUtterance
Generates the F0 contour for the utterance.- Specified by:
processUtterancein interfaceUtteranceProcessor- Parameters:
utterance- the utterance to process- Throws:
ProcessException- if anIOExceptionis thrown during the processing of the utterance
-
parseAndAdd
Parses the line into an F0ModelTerm.- Parameters:
list- resulting F0ModelTerm is added to this listline- the string to parse
-
toString
Returns the string representation of the object.
-