com.sun.speech.freetts.en
Class ContourGenerator

java.lang.Object
  extended bycom.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
ContourGenerator(java.net.URL url, float modelMean, float modelStddev)
          Creates a ContourGenerator utterance processor.
 
Method Summary
protected  void parseAndAdd(java.util.List list, java.lang.String line)
          Parses the line into an F0ModelTerm.
 void processUtterance(Utterance utterance)
          Generates the F0 contour for the utterance.
 java.lang.String toString()
          Returns the string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContourGenerator

public ContourGenerator(java.net.URL url,
                        float modelMean,
                        float modelStddev)
                 throws java.io.IOException
Creates a ContourGenerator utterance processor.

Parameters:
url - source of the data
modelMean - the average frequency
modelStddev - 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:
processUtterance in interface UtteranceProcessor
Parameters:
utterance - the utterance to process
Throws:
ProcessException - if an IOException is 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 list
line - the string to parse

toString

public java.lang.String toString()
Returns the string representation of the object.

Returns:
the string representation of the object