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 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(URL url, float modelMean, float modelStddev)`
Creates a ContourGenerator utterance processor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`parseAndAdd(List list, String line)`
Parses the line into an F0ModelTerm.
`void`
`processUtterance(Utterance utterance)`
Generates the F0 contour for the utterance.
`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 Details

### ContourGenerator

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

Parameters:
  `url` - source of the data
  `modelMean` - the average frequency
  `modelStddev` - the std deviation of the frequency
Throws:
  `IOException` - if an error occurs while loading data

## Method Details

### 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(List list, String line)
Parses the line into an F0ModelTerm.

Parameters:
  `list` - resulting F0ModelTerm is added to this list
  `line` - the string to parse

### toString

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

Overrides:
  `toString` in class `Object`
Returns:
  the string representation of the object