Package com.sun.speech.freetts.relp

# Class SampleInfo

java.lang.Object
com.sun.speech.freetts.relp.SampleInfo

public class SampleInfo extends 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

Fields
Modifier and Type
Field
Description
`static final String`
`UTT_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(DataInputStream is)`
Constructs a sample info from the given input stream
`SampleInfo(ByteBuffer bb)`
Constructs a sample info from the given byte buffer.

## Method Summary

Modifier and Type
Method
Description
`void`
`dumpBinary(DataOutputStream os)`
Dump a binary form of the sample rate to the given output stream
`final float`
`getCoeffMin()`
Returns the minimum for linear predictive coding.
`final float`
`getCoeffRange()`
Returns the range for linear predictive coding.
`final int`
`getNumberOfChannels()`
Returns the number of channels.
`final float`
`getPostEmphasis()`
Returns the post emphasis
`final int`
`getResidualFold()`
Returns the residual fold.
`final 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 Details

### UTT_NAME

public static final String UTT_NAME

See Also:
  - Constant Field Values

## 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 rate
  `numberOfChannels` - the number of channels
  `residualFold` - the residual fold
  `coeffMin` - the minimum coefficient
  `coeffRange` - the range of coefficients

### SampleInfo

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

Parameters:
  `bb` - the byte buffer
Throws:
  `IOException` - if an input error occurs

### SampleInfo

public SampleInfo(DataInputStream is) throws IOException
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

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

Parameters:
  `os` - the output stream
Throws:
  `IOException` - if an error occurs