com.sun.speech.freetts.relp
Class SampleInfo

java.lang.Object
  extended bycom.sun.speech.freetts.relp.SampleInfo

public class SampleInfo
extends java.lang.Object

Describes global sample parameters. A sample info is generally added to an utterance to describe the type of unit data that has been generated.


Field Summary
static java.lang.String UTT_NAME
           
 
Constructor Summary
SampleInfo(java.nio.ByteBuffer bb)
          Constructs a sample info from the given byte buffer.
SampleInfo(java.io.DataInputStream is)
          Constructs a sample info from the given input stream
SampleInfo(int sampleRate, int numberOfChannels, int residualFold, float coeffMin, float coeffRange, float postEmphasis)
          Creates a new sample info.
 
Method Summary
 void dumpBinary(java.io.DataOutputStream os)
          Dump a binary form of the sample rate to the given output stream
 float getCoeffMin()
          Returns the minimum for linear predictive coding.
 float getCoeffRange()
          Returns the range for linear predictive coding.
 int getNumberOfChannels()
          Returns the number of channels.
 float getPostEmphasis()
          Returns the post emphasis
 int getResidualFold()
          Returns the residual fold.
 int getSampleRate()
          Returns the sample rate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UTT_NAME

public static final java.lang.String UTT_NAME
See Also:
Constant Field Values
Constructor Detail

SampleInfo

public SampleInfo(int sampleRate,
                  int numberOfChannels,
                  int residualFold,
                  float coeffMin,
                  float coeffRange,
                  float postEmphasis)
Creates a new sample info.

Parameters:
sampleRate - the sample rate
numberOfChannels - the number of channels
residualFold - the residual fold
coeffMin - the minimum coefficient
coeffRange - the range of coefficients

SampleInfo

public SampleInfo(java.nio.ByteBuffer bb)
           throws java.io.IOException
Constructs a sample info from the given byte buffer.

Parameters:
bb - the byte buffer
Throws:
java.io.IOException - if an input error occurs

SampleInfo

public SampleInfo(java.io.DataInputStream is)
           throws java.io.IOException
Constructs a sample info from the given input stream

Parameters:
is - the input stream
Throws:
java.io.IOException - if an input error occurs
Method Detail

getSampleRate

public final int getSampleRate()
Returns the sample rate.

Returns:
the sample rate

getNumberOfChannels

public final int getNumberOfChannels()
Returns the number of channels.

Returns:
the number of channels.

getResidualFold

public final int getResidualFold()
Returns the residual fold.

Returns:
the residual fold

getCoeffMin

public final float getCoeffMin()
Returns the minimum for linear predictive coding.

Returns:
the minimum for linear predictive coding.

getCoeffRange

public final float getCoeffRange()
Returns the range for linear predictive coding.

Returns:
the range for linear predictive coding.

getPostEmphasis

public final float getPostEmphasis()
Returns the post emphasis

Returns:
the post emphasis

dumpBinary

public void dumpBinary(java.io.DataOutputStream os)
                throws java.io.IOException
Dump a binary form of the sample rate to the given output stream

Parameters:
os - the output stream
Throws:
java.io.IOException - if an error occurs