voxforge.org
VoxForge Dev

Changeset 2360

Show
Ignore:
Timestamp:
11/18/07 22:35:08 (10 months ago)
Author:
kmaclean
Message:

Speech Submission app removed JSpeex references to JSpeexEnc

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Trunk/SpeechSubmission/VFSpeechSubmission/java/src/speechrecorder/CapturePlayback.java

    r2359 r2360  
    276276    String helppage; 
    277277    String cookie; 
    278  
    279     JSpeexEnc encoder; 
    280278   
    281279        String tempdir = getTempDir(); 
     
    397395                        return; 
    398396                } 
    399                 System.err.println("CapturePlayback's WAV file for recording wavFile1 is:" + wavFile1); 
    400                 System.err.println("CapturePlayback's WAV file for recording wavFile2 is:" + wavFile2); 
    401                 System.err.println("CapturePlayback's WAV file for recording wavFile3 is:" + wavFile3); 
    402                 System.err.println("CapturePlayback's WAV file for recording wavFile4 is:" + wavFile4); 
    403                 System.err.println("CapturePlayback's WAV file for recording wavFile5 is:" + wavFile5); 
    404                 System.err.println("CapturePlayback's WAV file for recording wavFile1 is:" + wavFile6); 
    405                 System.err.println("CapturePlayback's WAV file for recording wavFile2 is:" + wavFile7); 
    406                 System.err.println("CapturePlayback's WAV file for recording wavFile3 is:" + wavFile8); 
    407                 System.err.println("CapturePlayback's WAV file for recording wavFile4 is:" + wavFile9); 
    408                 System.err.println("CapturePlayback's WAV file for recording wavFile5 is:" + wavFile10);                 
    409397                System.err.println("CapturePlayback's WAV file for recording uploadWavFile1 is:" + uploadWavFile1); 
    410398                System.err.println("CapturePlayback's WAV file for recording uploadWavFile2 is:" + uploadWavFile2); 
     
    17321720            //progBar.setIndeterminate(true); 
    17331721 
    1734             encoder = new JSpeexEnc(); 
    1735              
    1736             CompressionMonitor compressionMonitor = new CompressionMonitor(); 
    1737  
    1738  
    1739             encoder.sampleRate = (int)format.getSampleRate(); 
    1740             encoder.channels = format.getChannels(); 
    1741             encoder.destFormat = JSpeexEnc.FILE_FORMAT_OGG; 
    1742             encoder.printlevel = JSpeexEnc.DEBUG; 
    1743             encoder.srcFormat = JSpeexEnc.FILE_FORMAT_RAW; 
    1744             encoder.vbr = true; 
    1745             encoder.vad = true; 
    1746             encoder.dtx = true; 
    1747  
    17481722            try { 
    17491723//DEL WHEN NEW METHOD                if (AudioSystem.write(audioInputStream, AudioFileFormat.Type.WAVE, wavFile) == -1) { 
     
    17561730                progBar.setMinimum(0); 
    17571731                progBar.setMaximum(100); 
    1758                 compressionMonitor.start(); 
    1759   // !!!!!!              encoder.encode(wavFile, spxFile); 
    1760                 compressionMonitor.stop(); 
     1732 
    17611733 
    17621734 
     
    19871959        } 
    19881960    } 
    1989  
    1990     /**  
    1991      * Updates the progress bar during the compression stage 
    1992      */ 
    1993     class CompressionMonitor implements Runnable { 
    1994  
    1995         Thread thread; 
    1996  
    1997         public void start() { 
    1998             errStr = null; 
    1999             thread = new Thread(this); 
    2000             thread.setName("CompressionMonitor"); 
    2001             thread.start(); 
    2002         } 
    2003  
    2004         public void stop() { 
    2005             thread = null; 
    2006         } 
    2007  
    2008         public void run() { 
    2009                         while ((thread != null)) { 
    2010                              
    2011                             // NOT DONE: QUERY THE ENCODER TO FIND THE AMOUNT ENCODED, UPDATE THE VIEWER 
    2012                             // NOT DONE: QUERY THE ENCODER TO FIND THE AMOUNT ENCODED, UPDATE THE VIEWER 
    2013                             // NOT DONE: QUERY THE ENCODER TO FIND THE AMOUNT ENCODED, UPDATE THE VIEWER 
    2014                              
    2015                 progBar.setValue((int) (100L * encoder.getNumRawBytesProcessed() / totalBytesWritten) ); 
    2016                              
    2017                                 try { 
    2018                                     Thread.sleep(1500L); 
    2019                                 } catch(InterruptedException err) { 
    2020                                 } 
    2021                         } 
    2022         } 
    2023  
    2024     } // End class CompressionMonitor 
    20251961 
    20261962    /**