Package com.sun.speech.freetts.relp
Class SampleInfo
java.lang.Object
com.sun.speech.freetts.relp.SampleInfo
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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSampleInfo
(int sampleRate, int numberOfChannels, int residualFold, float coeffMin, float coeffRange, float postEmphasis) Creates a new sample info.Constructs a sample info from the given input streamSampleInfo
(ByteBuffer bb) Constructs a sample info from the given byte buffer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Dump a binary form of the sample rate to the given output streamfinal float
Returns the minimum for linear predictive coding.final float
Returns the range for linear predictive coding.final int
Returns the number of channels.final float
Returns the post emphasisfinal int
Returns the residual fold.final int
Returns the sample rate.
-
Field Details
-
UTT_NAME
- See Also:
-
-
Constructor Details
-
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
Constructs a sample info from the given byte buffer.- Parameters:
bb
- the byte buffer- Throws:
IOException
- if an input error occurs
-
SampleInfo
Constructs a sample info from the given input stream- Parameters:
is
- the input stream- Throws:
IOException
- if an input error occurs
-
-
Method Details
-
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
Dump a binary form of the sample rate to the given output stream- Parameters:
os
- the output stream- Throws:
IOException
- if an error occurs
-