|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.speech.freetts.diphone.Diphone com.sun.speech.freetts.diphone.AliasDiphone
Represent an alias diphone which is just another name for an already-existing original diphone. This can be used just like a "real" diphone.
Field Summary |
Fields inherited from class com.sun.speech.freetts.diphone.Diphone |
ALIAS_MAGIC, MAGIC, NAME_LENGTH |
Constructor Summary | |
AliasDiphone(java.lang.String name,
java.lang.String originalName)
|
Method Summary | |
void |
dump()
dumps out this Diphone. |
void |
dumpBinary(java.nio.ByteBuffer bb)
Dumps the diphone to the given channel. |
void |
dumpBinary(java.io.DataOutputStream os)
Dumps the diphone to the given channel. |
int |
getMidPoint()
Returns the midpoint index. the midpoint index is the sample that divides the diphone into the first and second parts. |
java.lang.String |
getOriginalName()
Get the name of the original name that this alias points to. |
int |
getPbPositionMillis()
Returns the midpoint index. the midpoint index is the sample that divides the diphone into the first and second parts. |
Sample[] |
getSamples()
Returns the samples associated with this diphone. |
Sample |
getSamples(int which)
Returns a particular sample. |
int |
getUnitSize(int unitPart)
Returns the total number of residuals in the given part for this diphone. |
Sample |
nearestSample(float uIndex,
int unitPart)
Returns the sample that is closest to uIndex. |
void |
setOriginalDiphone(Diphone original)
Associate the actual diphone object of the original with this alias. |
Methods inherited from class com.sun.speech.freetts.diphone.Diphone |
getName, loadBinary, loadBinary |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AliasDiphone(java.lang.String name, java.lang.String originalName)
name
- The alias name to use for the existing diphoneoriginalName
- the original name of the diphone.Method Detail |
public java.lang.String getOriginalName()
public void setOriginalDiphone(Diphone original)
original
- a diphone object whose getName() must return the same
as our getOriginalName().
java.lang.IllegalArgumentException
- if the diphone to be registered as the
original has a name which is different from this AliasDiphone's original name
as returned by getOriginalName().public Sample[] getSamples()
getSamples
in class Diphone
public Sample getSamples(int which)
getSamples
in class Diphone
which
- which sample to return
public int getMidPoint()
getMidPoint
in class Diphone
public int getPbPositionMillis()
getPbPositionMillis
in class Diphone
public Sample nearestSample(float uIndex, int unitPart)
nearestSample
in class Diphone
uIndex
- the desired indexunitPart
- do we want the first have (1) or the second
half (2)
public int getUnitSize(int unitPart)
getUnitSize
in class Diphone
unitPart
- indicates which part is of interest (1 or 2)
public void dump()
dump
in class Diphone
public void dumpBinary(java.nio.ByteBuffer bb) throws java.io.IOException
dumpBinary
in class Diphone
bb
- the ByteBuffer to write to
java.io.IOException
- if IO error occurspublic void dumpBinary(java.io.DataOutputStream os) throws java.io.IOException
dumpBinary
in class Diphone
os
- the DataOutputStream to write to
java.io.IOException
- if IO error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |