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 Details

  • 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