upstream version 1.2.2
[debian/freetts] / com / sun / speech / freetts / Unit.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 import com.sun.speech.freetts.relp.Sample;      
15
16 /**
17  * Defines a generic interface to a Unit. 
18  *
19  */
20 public interface Unit {
21     
22     /**
23      * Returns the name of this Unit.
24      *
25      * @return the name of this Unit
26      */
27     public String getName();
28
29     /**
30      * Returns the size of this unit.
31      *
32      * @return the size of this unit
33      */
34     public int getSize();
35
36     /**
37      * Retrieves the nearest sample.
38      *
39      * @param index the ideal index
40      *
41      * @return the nearest Sample
42      */
43     public Sample getNearestSample(float index);
44
45
46     /**
47      * Dumps this unit.
48      */
49     public void dump(); 
50 }