|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.speech.freetts.relp.Sample
A single short term sample containing Residual Excited Linear Predictive (RELP) frame and residual voice data.
Constructor Summary | |
Sample(java.io.BufferedReader reader,
int numChannels)
Reads a sample from the input reader. |
|
Sample(short[] frameData,
byte[] residualData)
Constructs a RELP Sample from its component parts |
|
Sample(short[] frameData,
byte[] residualData,
int residualSize)
Constructs a Sample from its component parts |
Method Summary | |
boolean |
compare(Sample other)
Compares two samples. |
void |
dump()
Dumps the sample: |
void |
dumpBinary(java.nio.ByteBuffer bb)
Dumps the samples to the given ByteBuffer |
void |
dumpBinary(java.io.DataOutputStream os)
Dumps the samples to the given stream |
short[] |
getFrameData()
Gets the frame data associated with this sample |
int |
getFrameData(int which)
Returns the normalized frame data. |
byte[] |
getResidualData()
Gets the residual data associated with this sample |
int |
getResidualData(int which)
Returns the normalized residual data. |
int |
getResidualSize()
Returns the number of residuals in this Sample. |
static Sample |
loadBinary(java.nio.ByteBuffer bb)
Loads the samples from the byte bufer |
static Sample |
loadBinary(java.io.DataInputStream dis)
Loads the samples from the given channel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Sample(short[] frameData, byte[] residualData)
frameData
- the framedataresidualData
- the residual datapublic Sample(short[] frameData, byte[] residualData, int residualSize)
frameData
- the framedataresidualData
- the residual datapublic Sample(java.io.BufferedReader reader, int numChannels)
reader
- the input reader to read the data fromnumChannels
- the number of channels per frameMethod Detail |
public short[] getFrameData()
public byte[] getResidualData()
public int getResidualSize()
public int getResidualData(int which)
which
- the index of the data of interest
public int getFrameData(int which)
which
- the index of the data of interest
public void dump()
public void dumpBinary(java.nio.ByteBuffer bb) throws java.io.IOException
bb
- the ByteBuffer to write the data to.
java.io.IOException
- if IO error occurspublic void dumpBinary(java.io.DataOutputStream os) throws java.io.IOException
os
- the DataOutputStream to write the data to.
java.io.IOException
- if IO error occurspublic static Sample loadBinary(java.nio.ByteBuffer bb) throws java.io.IOException
bb
- the byte buffer to read the data from.
java.io.IOException
- if IO error occurspublic static Sample loadBinary(java.io.DataInputStream dis) throws java.io.IOException
dis
- the DataInputStream to read the data from.
java.io.IOException
- if IO error occurspublic boolean compare(Sample other)
other
- the other sample to compare this one to
true
if they compare; otherwise
false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |