Package com.sun.speech.freetts
Class PhoneDurationsImpl
java.lang.Object
com.sun.speech.freetts.PhoneDurationsImpl
- All Implemented Interfaces:
PhoneDurations
Maintains set of PhoneDuration instances read in from a file. The
format of the file is as follows:
phone mean stddev phone mean stddev phone mean stddev ...Where
phone is the phone name, mean is
a float representing the mean duration of the phone
(typically in seconds), and stddev is a
float representing the standard deviation from the
mean.-
Constructor Summary
ConstructorsConstructorDescriptionPhoneDurationsImpl(URL url) Creates a new PhoneDurationsImpl by reading from the given URL. -
Method Summary
Modifier and TypeMethodDescriptiongetPhoneDuration(String phone) Gets thePhoneDurationfor the given phone.
-
Constructor Details
-
PhoneDurationsImpl
Creates a new PhoneDurationsImpl by reading from the given URL.- Parameters:
url- the input source- Throws:
IOException- if an error occurs
-
-
Method Details
-
getPhoneDuration
Gets thePhoneDurationfor the given phone. If no duration is applicable, returnsnull.- Specified by:
getPhoneDurationin interfacePhoneDurations- Parameters:
phone- the phone- Returns:
- the
PhoneDurationforphone
-