@@ -0,0 +1,1879 @@
+/**%0A * %5B%5B%5Bcopyright%5D%5D%5D%0A */%0A%0Apackage tests.frontend;%0A%0Aimport edu.cmu.sphinx.frontend.BatchFileAudioSource;%0Aimport edu.cmu.sphinx.frontend.FrontEnd;%0Aimport edu.cmu.sphinx.frontend.Preemphasizer;%0Aimport edu.cmu.sphinx.frontend.Windower;%0Aimport edu.cmu.sphinx.frontend.SpectrumAnalyzer;%0Aimport edu.cmu.sphinx.frontend.StreamAudioSource;%0Aimport edu.cmu.sphinx.util.Timer;%0A%0Aimport java.io.FileInputStream;%0A%0A%0A/**%0A * Test program for the SpectrumAnalyzer%0A */%0Apublic class SpectrumAnalyzerTest %7B%0A%0A    public static void main(String%5B%5D argv) %7B%0A%09if (argv.length %3C 1) %7B%0A%09    System.out.println(%22Usage: java FrontEnd %3Cfilename%3E%22);%0A%09%7D%0A%0A        boolean batchMode = Boolean.getBoolean%0A            (%22tests.frontend.SpectrumAnalyzerTest.batchMode%22);%0A        boolean dumpValues = Boolean.getBoolean%0A            (%22tests.frontend.SpectrumAnalyzerTest.dumpValues%22);%0A        boolean dumpTimes = Boolean.getBoolean%0A            (%22tests.frontend.SpectrumAnalyzerTest.dumpTimes%22);%0A%0A        // create the processors%0A        Preemphasizer preemphasizer = new Preemphasizer();%0A        Windower hammingWindow = new Windower();%0A        SpectrumAnalyzer spectrumAnalyzer = new SpectrumAnalyzer();%0A        %0A        spectrumAnalyzer.setDump(dumpValues);%0A%0A        // add the processors to the FrontEnd%0A%09FrontEnd frontend = new FrontEnd();%0A%0A      %09frontend.addProcessor(preemphasizer);%0A        frontend.addProcessor(hammingWindow);%0A        frontend.addProcessor(spectrumAnalyzer);%0A%0A%09try %7B%0A            if (batchMode) %7B%0A                frontend.setAudioSource(new BatchFileAudioSource(argv%5B0%5D));%0A            %7D else %7B%0A                frontend.setAudioSource%0A                    (new StreamAudioSource(new FileInputStream(argv%5B0%5D)));%0A            %7D%0A%0A%09    frontend.run();%0A            %0A            if (dumpTimes) %7B%0A                Timer.dumpAll();%0A            %7D%0A%09%7D catch (Exception e) %7B%0A%09    e.printStackTrace();%0A%09%7D%0A    %7D%0A%7D%0A

Test for SpectrumAnalyzer.java