|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.speech.freetts.relp.LPCResult
Contains the result of linear predictive coding processing.
| Constructor Summary | |
LPCResult()
|
|
| Method Summary | |
void |
copyResiduals(byte[] source,
int targetPosition,
int targetSize)
Copies the information in the given unit to the array of residuals, starting at the given index, up until targetSize chars. |
void |
copyResidualsPulse(byte[] source,
int targetPosition,
int targetSize)
Copies the residual puse in the given unit to the array of residuals, starting at the given index, up until targetSize chars. |
void |
dump()
Dumps this LPCResult to standard out |
void |
dump(java.io.Writer writer)
Dumps this LPCResult to the given stream. |
void |
dumpASCII()
Dumps the wave data associated with this result |
void |
dumpASCII(java.lang.String path)
Dumps the wave data associated with this result |
void |
dumpASCII(java.io.Writer writer)
Dumps the wave out to the given stream |
short[] |
getFrame(int index)
Returns the frame at the given index. |
int |
getFrameShift(int frameIndex)
Returns the time difference of the frame at the given position with the frame prior to that. |
int |
getFrameSize()
Returns the sizes of frames in this LPC. |
float |
getLPCMin()
Returns the LPC minimum. |
float |
getLPCRange()
Returns the LPC range. |
int |
getNumberOfChannels()
Returns the number of channels in this LPCResult. |
int |
getNumberOfFrames()
Returns the number of frames in this LPCResult. |
int |
getNumberOfSamples()
Returns the number of samples in this LPC result |
byte[] |
getResiduals()
Returns the array of residuals. |
int[] |
getResidualSizes()
Returns the array of residuals sizes. |
int |
getSampleRate()
Returns the sample rate. |
int[] |
getTimes()
Returns the array of times. |
byte[] |
getWaveSamples()
|
boolean |
playWave(AudioPlayer player,
Utterance utterance)
Synthesize a Wave from this LPCResult |
void |
resizeFrames(int numberOfFrames)
Resets the number of frames in this LPCResult. |
void |
resizeResiduals(int numberOfSamples)
Resets the number of residuals, and initialize all of them to 255 (which is 0 for mulaw). |
void |
setFrame(int index,
short[] newFrames)
Sets the frame at the given index. |
void |
setFrameSize(int frameSize)
Sets the sizes of frames in this LPC to the given size. |
void |
setLPCMin(float min)
Sets the LPC minimum. |
void |
setLPCRange(float range)
Sets the LPC range. |
void |
setNumberOfChannels(int numberOfChannels)
Sets the number of channels. |
void |
setNumberOfFrames(int numberFrames)
Sets the number of frames in this LPC Result. |
void |
setResidualSizes(int[] sizes)
Sets the array of residual sizes. |
void |
setSampleRate(int rate)
Sets the sample rate. |
void |
setTimes(int[] times)
Sets the array of times. |
void |
setValues(int numberOfChannels,
int sampleRate,
int residualFold,
float lpcMin,
float lpcRange)
A convenience method for setting the LPC values. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LPCResult()
| Method Detail |
public void resizeFrames(int numberOfFrames)
numberOfFrames - the number of frames in this LPC resultpublic void resizeResiduals(int numberOfSamples)
numberOfSamples - the number of samples in this LPC result
public void setValues(int numberOfChannels,
int sampleRate,
int residualFold,
float lpcMin,
float lpcRange)
numberOfChannels - the number of channelssampleRate - the sample ratelpcMin - the LPC minimumlpcRange - the LPC rangepublic int getFrameShift(int frameIndex)
frameIndex - the position of the frame
public int getFrameSize()
public short[] getFrame(int index)
index - the index of interest
public int[] getTimes()
public int getNumberOfFrames()
public int getNumberOfChannels()
public float getLPCMin()
public float getLPCRange()
public int getNumberOfSamples()
public int getSampleRate()
public int[] getResidualSizes()
public byte[] getResiduals()
public void setFrameSize(int frameSize)
frameSize - the new frame sizepublic void setNumberOfFrames(int numberFrames)
numberFrames - the number of frames in this result
public void setFrame(int index,
short[] newFrames)
index - the position of the frame to setnewFrames - new frame datapublic void setTimes(int[] times)
times - the times datapublic void setNumberOfChannels(int numberOfChannels)
numberOfChannels - the number of channelspublic void setLPCMin(float min)
min - the LPC minimumpublic void setLPCRange(float range)
range - the LPC rangepublic void setSampleRate(int rate)
rate - the sample ratepublic void setResidualSizes(int[] sizes)
sizes - the new residual sizes
public void copyResiduals(byte[] source,
int targetPosition,
int targetSize)
source - the unit that holds the information sourcetargetPosition - start position in the array of residualstargetSize - the maximum number of characters to copy
public void copyResidualsPulse(byte[] source,
int targetPosition,
int targetSize)
source - the unit that holds the information sourcetargetPosition - start position in the array of residualstargetSize - the maximum number of characters to copy
public boolean playWave(AudioPlayer player,
Utterance utterance)
public byte[] getWaveSamples()
public void dump()
public void dump(java.io.Writer writer)
writer - the output streampublic void dumpASCII()
public void dumpASCII(java.lang.String path)
throws java.io.IOException
path - the path where the wave data is appended to
java.io.IOException - if an IO error occurspublic void dumpASCII(java.io.Writer writer)
writer - the output stream
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||