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.
7 * See the file "license.terms" for information on usage and
8 * redistribution of this file, and for a DISCLAIMER OF ALL
11 package com.sun.speech.freetts;
14 import com.sun.speech.freetts.relp.Sample;
17 * Defines a generic interface to a Unit.
20 public interface Unit {
23 * Returns the name of this Unit.
25 * @return the name of this Unit
27 public String getName();
30 * Returns the size of this unit.
32 * @return the size of this unit
37 * Retrieves the nearest sample.
39 * @param index the ideal index
41 * @return the nearest Sample
43 public Sample getNearestSample(float index);