Package com.sun.speech.freetts.relp
Class SampleInfo
- java.lang.Object
-
- com.sun.speech.freetts.relp.SampleInfo
-
public class SampleInfo extends java.lang.ObjectDescribes 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
Fields Modifier and Type Field Description static java.lang.StringUTT_NAME
-
Constructor Summary
Constructors Constructor Description SampleInfo(int sampleRate, int numberOfChannels, int residualFold, float coeffMin, float coeffRange, float postEmphasis)Creates a new sample info.SampleInfo(java.io.DataInputStream is)Constructs a sample info from the given input streamSampleInfo(java.nio.ByteBuffer bb)Constructs a sample info from the given byte buffer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddumpBinary(java.io.DataOutputStream os)Dump a binary form of the sample rate to the given output streamfloatgetCoeffMin()Returns the minimum for linear predictive coding.floatgetCoeffRange()Returns the range for linear predictive coding.intgetNumberOfChannels()Returns the number of channels.floatgetPostEmphasis()Returns the post emphasisintgetResidualFold()Returns the residual fold.intgetSampleRate()Returns the sample rate.
-
-
-
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 ratenumberOfChannels- the number of channelsresidualFold- the residual foldcoeffMin- the minimum coefficientcoeffRange- the range of coefficients
-
SampleInfo
public SampleInfo(java.nio.ByteBuffer bb) throws java.io.IOExceptionConstructs 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.IOExceptionConstructs 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.IOExceptionDump 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
-
-