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 ...
Wherephone
is the phone name,mean
is afloat
representing the mean duration of the phone (typically in seconds), andstddev
is afloat
representing 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 PhoneDuration
getPhoneDuration(java.lang.String phone)
Gets thePhoneDuration
for the given phone.
-
-
-
Method Detail
-
getPhoneDuration
public PhoneDuration getPhoneDuration(java.lang.String phone)
Gets thePhoneDuration
for the given phone. If no duration is applicable, returnsnull
.- Specified by:
getPhoneDuration
in interfacePhoneDurations
- Parameters:
phone
- the phone- Returns:
- the
PhoneDuration
forphone
-
-