upstream version 1.2.2
[debian/freetts] / com / sun / speech / freetts / PhoneDuration.java
1 /**
2  * Portions Copyright 2001 Sun Microsystems, Inc.
3  * Portions Copyright 1999-2001 Language Technologies Institute, 
4  * Carnegie Mellon University.
5  * All Rights Reserved.  Use is subject to license terms.
6  * 
7  * See the file "license.terms" for information on usage and
8  * redistribution of this file, and for a DISCLAIMER OF ALL 
9  * WARRANTIES.
10  */
11 package com.sun.speech.freetts;
12
13 /**
14  * Maintains the mean duration and standard deviation about a phone.
15  * These are meant to be used by the code that calculates segment
16  * durations via statistical methods, and are paired with the phone
17  * by <code>PhoneDurations</code>.
18  *
19  * @see PhoneDurations
20  */
21 public class PhoneDuration {
22     /**
23      * The mean duration.
24      */
25     private float mean;
26
27     /**
28      * The standard deviation from the mean.
29      */
30     private float standardDeviation;
31
32     /**
33      * Creates a new <code>PhoneDuration</code> with the given mean
34      * and standard deviation.
35      *
36      * @param mean mean duration, typically in seconds
37      * @param standardDeviation standardDeviation from the mean
38      */
39     public PhoneDuration(float mean, float standardDeviation) {
40         this.mean = mean;
41         this.standardDeviation = standardDeviation;
42     }
43
44     /**
45      * Gets the mean.  The return value is typically in seconds.
46      *
47      * @return the mean
48      */
49     public float getMean() {
50         return mean;
51     }
52
53     /**
54      * Gets the standard deviation from the mean.
55      *
56      * @return the standard deviation from the mean
57      */
58     public float getStandardDeviation() {
59         return standardDeviation;
60     }
61 }
62
63
64