00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef LPC_H
00020 #define LPC_H
00021
00022 #include "Typedefs.h"
00023 #include "Debug.h"
00024
00025 #include "Filter.h"
00026 #include "Autocorrelation.h"
00027
00060 class LPC {
00061 protected:
00062
00063 int _inputSize;
00064 int _coefficientCount;
00065 Real _preEmphasis;
00066
00067
00068 MatrixXR _pre;
00069 MatrixXR _preRow;
00070 MatrixXR _temp;
00071 MatrixXR _acorr;
00072
00073 Filter _preFilter;
00074 Autocorrelation _acorrelation;
00075
00076 public:
00088 LPC(int inputSize = 1024, int coefficientCount = 15, Real preEmphasis = 0.0);
00089
00093 ~LPC();
00094
00095 void setup();
00096 void reset();
00097
00122 void process(const MatrixXR& frames, MatrixXR* lpcCoefficients,
00123 MatrixXR* reflectionCoefficients, MatrixXR* error);
00124
00131 int inputSize() const;
00132
00140 void setInputSize( int size, bool callSetup = true );
00141
00148 int coefficientCount() const;
00149
00156 void setCoefficientCount( int count, bool callSetup = true );
00157
00164 Real preEmphasis() const;
00165
00171 void setPreEmphasis( Real coefficient, bool callSetup = true );
00172
00173 };
00174
00175 #endif