Package com.sun.speech.freetts
Class PhoneDurationsImpl
- java.lang.Object
-
- com.sun.speech.freetts.PhoneDurationsImpl
-
- All Implemented Interfaces:
PhoneDurations
public class PhoneDurationsImpl extends java.lang.Object implements 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 ...
Wherephoneis the phone name,meanis afloatrepresenting the mean duration of the phone (typically in seconds), andstddevis afloatrepresenting the standard deviation from the mean.
-
-
Constructor Summary
Constructors Constructor Description PhoneDurationsImpl(java.net.URL url)Creates a new PhoneDurationsImpl by reading from the given URL.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PhoneDurationgetPhoneDuration(java.lang.String phone)Gets thePhoneDurationfor the given phone.
-
-
-
Method Detail
-
getPhoneDuration
public PhoneDuration getPhoneDuration(java.lang.String phone)
Gets thePhoneDurationfor the given phone. If no duration is applicable, returnsnull.- Specified by:
getPhoneDurationin interfacePhoneDurations- Parameters:
phone- the phone- Returns:
- the
PhoneDurationforphone
-
-