class LpcFeaturesExtractor extends WindowedFeaturesExtractor<double[]> {

    @Override
    public double[] extractFeatures(double[] voiceSample) {

        double[] voiceFeatures = new double[poles];
        double[] audioWindow = new double[windowSize];

        int counter = 0;
        int halfWindowLength = windowSize / 2;

        for (int i = 0; (i + windowSize) <= voiceSample.length; i += halfWindowLength) {

            System.arraycopy(voiceSample, i, audioWindow, 0, windowSize);

            windowFunction.applyFunction(audioWindow);
            double[] lpcCoeffs = lpc.applyLinearPredictiveCoding(audioWindow)[0];

            for (int j = 0; j < poles; j++) {
                voiceFeatures[j] += lpcCoeffs[j];
            }
            counter++;
        }

        if (counter > 1) {
            for (int i = 0; i < poles; i++) {
                voiceFeatures[i] /= counter;
            }
        }
        return voiceFeatures;
    }

    public  LpcFeaturesExtractor(float sampleRate, int poles);

}