    @Test
    public void testVoice1() throws IOException {

        final int sampleRate = 44100;
        double p0 = 32767.;
        double dbFsReference = -20 * Math.log10(p0);
        // Reference spectrum
        double[] refSpl = {-66, -68.04, -67.52, -45.97, -31.96, -37.13, -49.21, -35.29, -43.01,
                -42.95, -48.65, -49.04, -53.27, -52.15, -52.65, -52.8, -52.31, -53.56, -52.54,
                -53.96, -53.63, -58.53, -67.22};
        double refGlobalSpl = 0;
        for (double lvl : refSpl) {
            refGlobalSpl += Math.pow(10, lvl / 10.);
        }
        refGlobalSpl = 10 * Math.log10(refGlobalSpl);
        // Test error induced by window overlapping
        // Read input signal
        InputStream inputStream = WindowTest.class.getResourceAsStream("speak_44100Hz_16bitsPCM_10s.raw");
        short[] signal = SOSSignalProcessing.loadShortStream(inputStream, ByteOrder.LITTLE_ENDIAN);
        // Reference value from ITA Toolbox

        // Test FFT without cutting
        FFTSignalProcessing fftSignalProcessing =
                new FFTSignalProcessing(sampleRate, ThirdOctaveBandsFiltering.STANDARD_FREQUENCIES_REDUCED, signal.length, dbFsReference);
        fftSignalProcessing.addSample(signal);
        FFTSignalProcessing.ProcessingResult processingResult = fftSignalProcessing.processSample(FFTSignalProcessing.WINDOW_TYPE.RECTANGULAR, false, false);

        assertEquals(refGlobalSpl, fftSignalProcessing.computeGlobalLeq(), 0.01);
        assertEquals(refGlobalSpl, processingResult.getGlobaldBaValue(), 0.01);

        // Test FFT windows

        checkSplSpectrum(refSpl, testFFTWindow(signal, sampleRate, 0.125, FFTSignalProcessing.WINDOW_TYPE.TUKEY, dbFsReference), 0, 1.11);

        checkSplSpectrum(refSpl, testFFTWindow(signal, sampleRate, 0.125, FFTSignalProcessing.WINDOW_TYPE.RECTANGULAR, dbFsReference), 0, 2.64);

        checkSplSpectrum(refSpl, testFFTWindow(signal, sampleRate, 1., FFTSignalProcessing.WINDOW_TYPE.TUKEY, dbFsReference), 0, 0.36);

        checkSplSpectrum(refSpl, testFFTWindow(signal, sampleRate, 1., FFTSignalProcessing.WINDOW_TYPE.RECTANGULAR, dbFsReference), 0, 0.774);

        //Test SOS

        //        SOSSignalProcessing sosSignalProcessing = new SOSSignalProcessing(sampleRate, ThirdOctaveBandsFiltering.FREQUENCY_BANDS.REDUCED);
        //        sosSignalProcessing.setAweighting(false);
        //
        //        int idSampleStart = 0;
        //        float[] sosBands = new float[STANDARD_FREQUENCIES_UNITTEST.length];
        //        while (idSampleStart < signal.length) {
        //            // Compute sub-sample size in order to not skip samples
        //            short[] samples = Arrays.copyOfRange(signal, idSampleStart, Math.min(signal.length, idSampleStart + sampleRate));
        //            idSampleStart += samples.length;
        //
        //            sosSignalProcessing.addSample(SOSSignalProcessing.convertShortToDouble(samples));
        //            double[] secondResults = sosSignalProcessing.processSample(p0);
        //            for (int idf = 0; idf < STANDARD_FREQUENCIES_UNITTEST.length; idf++) {
        //                sosBands[idf] += Math.pow(10, secondResults[idf] / 10);
        //            }
        //        }
        //        for (int idf = 0; idf < STANDARD_FREQUENCIES_UNITTEST.length; idf++) {
        //            sosBands[idf] = (float)(10 * Math.log10(sosBands[idf]));
        //        }
        //        dBError = 0.;
        //        checkSplSpectrum(refSpl, sosBands, 0, dBError);
    }