Package com.sun.speech.freetts.cart
Class Durator
java.lang.Object
com.sun.speech.freetts.cart.Durator
- All Implemented Interfaces:
UtteranceProcessor
Determines duration timing for
Relation.SEGMENT
relations in an utterance.
Annotates the Relation.SEGMENT
relation with an
"end" time feature.
[[[TODO: The mean words-per-minute rate should become part of the CART data. For now, it is passed into the constructor.]]]
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CART
The CART used for this duration UtteranceProcessor.protected final PhoneDurations
The PhoneDurations used for this duration UtteranceProcessor. -
Constructor Summary
ConstructorsConstructorDescriptionDurator
(CART cart, float meanRate, PhoneDurations durations) Creates a new duration UtteranceProcessor with the given CART and phone durations. -
Method Summary
Modifier and TypeMethodDescriptionvoid
processUtterance
(Utterance utterance) Annotates theRelation.SEGMENT
relations with cumulative "end" time features based on phone durations.toString()
-
Field Details
-
cart
The CART used for this duration UtteranceProcessor. It is passed into the constructor. -
durations
The PhoneDurations used for this duration UtteranceProcessor. It is passed into the constructor.
-
-
Constructor Details
-
Durator
Creates a new duration UtteranceProcessor with the given CART and phone durations.- Parameters:
cart
- contains zscore duration datameanRate
- the mean words per minute rate of the CART datadurations
- contains mean and standard deviation phone durations
-
-
Method Details
-
processUtterance
Annotates theRelation.SEGMENT
relations with cumulative "end" time features based on phone durations. Expects the CART to return a zscore for each phone, which specifies the number of standard deviations from the mean. This is coupled with a phone durations table that returns the mean and standard deviation for phones.- Specified by:
processUtterance
in interfaceUtteranceProcessor
- Parameters:
utterance
- the utterance to process- Throws:
ProcessException
- if a problem is encountered during the processing of the utterance
-
toString
-