001/** 002 * Portions Copyright 2001 Sun Microsystems, Inc. 003 * Portions Copyright 1999-2001 Language Technologies Institute, 004 * Carnegie Mellon University. 005 * All Rights Reserved. Use is subject to license terms. 006 * 007 * See the file "license.terms" for information on usage and 008 * redistribution of this file, and for a DISCLAIMER OF ALL 009 * WARRANTIES. 010 */ 011package com.sun.speech.freetts; 012 013/** 014 * Maintains the mean duration and standard deviation about a phone. 015 * These are meant to be used by the code that calculates segment 016 * durations via statistical methods, and are paired with the phone 017 * by <code>PhoneDurations</code>. 018 * 019 * @see PhoneDurations 020 */ 021public class PhoneDuration { 022 /** 023 * The mean duration. 024 */ 025 private float mean; 026 027 /** 028 * The standard deviation from the mean. 029 */ 030 private float standardDeviation; 031 032 /** 033 * Creates a new <code>PhoneDuration</code> with the given mean 034 * and standard deviation. 035 * 036 * @param mean mean duration, typically in seconds 037 * @param standardDeviation standardDeviation from the mean 038 */ 039 public PhoneDuration(float mean, float standardDeviation) { 040 this.mean = mean; 041 this.standardDeviation = standardDeviation; 042 } 043 044 /** 045 * Gets the mean. The return value is typically in seconds. 046 * 047 * @return the mean 048 */ 049 public float getMean() { 050 return mean; 051 } 052 053 /** 054 * Gets the standard deviation from the mean. 055 * 056 * @return the standard deviation from the mean 057 */ 058 public float getStandardDeviation() { 059 return standardDeviation; 060 } 061}