Package com.sun.speech.freetts.en
Class ContourGenerator
- java.lang.Object
-
- com.sun.speech.freetts.en.ContourGenerator
-
- All Implemented Interfaces:
UtteranceProcessor
public class ContourGenerator extends java.lang.Object implements 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
Constructors Constructor Description ContourGenerator(java.net.URL url, float modelMean, float modelStddev)Creates a ContourGenerator utterance processor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidparseAndAdd(java.util.List list, java.lang.String line)Parses the line into an F0ModelTerm.voidprocessUtterance(Utterance utterance)Generates the F0 contour for the utterance.java.lang.StringtoString()Returns the string representation of the object.
-
-
-
Constructor Detail
-
ContourGenerator
public ContourGenerator(java.net.URL url, float modelMean, float modelStddev) throws java.io.IOExceptionCreates a ContourGenerator utterance processor.- Parameters:
url- source of the datamodelMean- the average frequencymodelStddev- the std deviation of the frequency- Throws:
java.io.IOException- if an error occurs while loading data
-
-
Method Detail
-
processUtterance
public void processUtterance(Utterance utterance) throws ProcessException
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
protected void parseAndAdd(java.util.List list, java.lang.String line)Parses the line into an F0ModelTerm.- Parameters:
list- resulting F0ModelTerm is added to this listline- the string to parse
-
toString
public java.lang.String toString()
Returns the string representation of the object.- Overrides:
toStringin classjava.lang.Object- Returns:
- the string representation of the object
-
-