Class Lsp


  • public class Lsp
    extends java.lang.Object
    Line Spectral Pair
    Version:
    $Revision: 1.2 $
    Author:
    Jim Lawrence, helloNetwork.com, Marc Gimpel, Wimba S.A. (mgimpel@horizonwimba.com)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private float[] pw  
    • Constructor Summary

      Constructors 
      Constructor Description
      Lsp()
      Constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static float cheb_poly_eva​(float[] coef, float x, int m)
      This function evaluates a series of Chebyshev polynomials.
      static void enforce_margin​(float[] lsp, int len, float margin)
      Makes sure the LSPs are stable.
      static int lpc2lsp​(float[] a, int lpcrdr, float[] freq, int nb, float delta)
      This function converts LPC coefficients to LSP coefficients.
      void lsp2lpc​(float[] freq, float[] ak, int lpcrdr)
      Line Spectral Pair to Linear Prediction Coefficients
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • pw

        private float[] pw
    • Constructor Detail

      • Lsp

        public Lsp()
        Constructor
    • Method Detail

      • cheb_poly_eva

        public static final float cheb_poly_eva​(float[] coef,
                                                float x,
                                                int m)
        This function evaluates a series of Chebyshev polynomials.
        Parameters:
        coef - - coefficients of the polynomial to be evaluated.
        x - - the point where polynomial is to be evaluated.
        m - - order of the polynomial.
        Returns:
        the value of the polynomial at point x.
      • lpc2lsp

        public static int lpc2lsp​(float[] a,
                                  int lpcrdr,
                                  float[] freq,
                                  int nb,
                                  float delta)
        This function converts LPC coefficients to LSP coefficients.
        Parameters:
        a - - LPC coefficients.
        lpcrdr - - order of LPC coefficients (10).
        freq - - LSP frequencies in the x domain.
        nb - - number of sub-intervals (4).
        delta - - grid spacing interval (0.02).
        Returns:
        the number of roots (the LSP coefs are returned in the array).
      • lsp2lpc

        public void lsp2lpc​(float[] freq,
                            float[] ak,
                            int lpcrdr)
        Line Spectral Pair to Linear Prediction Coefficients
        Parameters:
        freq -
        ak -
        lpcrdr -
      • enforce_margin

        public static void enforce_margin​(float[] lsp,
                                          int len,
                                          float margin)
        Makes sure the LSPs are stable.
        Parameters:
        lsp -
        len -
        margin -