voxforge.org
VoxForge Dev

Changeset 2358

Show
Ignore:
Timestamp:
11/18/07 22:28:45 (1 year ago)
Author:
kmaclean
Message:

Speech Submission app removed JSpeex references to compression mode

Files:

Legend:

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

    r2357 r2358  
    7474    public static final int samplingRateFormat = 16;       
    7575    public static final int numberChannels = 1;       
    76 /*this code snippet might work to query audio card for sampling rate ...  
    77  *     DataLine.Info info = new DataLine.Info(TargetDataLine.class,  
    78                 samplingRateFormat); // format is an AudioFormat object 
    79         if (!AudioSystem.isLineSupported(info)) { 
    80             // Handle the error. 
    81             } 
    82             // Obtain and open the line. 
    83         try { 
    84             line = (TargetDataLine) AudioSystem.getLine(info); 
    85             line.open(format); 
    86         } catch (LineUnavailableException ex) { 
    87                 // Handle the error. 
    88             //...  
    89         } 
    90      
    91 */     
    9276     
    9377    AudioFormat format = new AudioFormat(samplingRate, samplingRateFormat, numberChannels, true, false); 
     
    199183    private File licenseNoticeFile;     
    200184 
    201 //DEL    JLabel progCompletion; 
    202185    JProgressBar progBar; 
    203186    int sentBytes; 
     
    234217//  ############ Localized Fields ####################################    
    235218    JTextField usernameTextField;   
    236    LabelLocalizer labels = new LabelLocalizer("Dutch"); 
     219    LabelLocalizer labels = new LabelLocalizer("Dutch"); 
    237220//   LabelLocalizer labels = new LabelLocalizer("English"); 
    238221    String usernamePanelLabel = labels.usernamePanelLabel; 
     
    295278 
    296279    JSpeexEnc encoder; 
    297  
    298     int compressionMode = 2; // Simple compression 1 (loqual) 2 (med) 3 (hiqual) 
    299      
     280   
    300281        String tempdir = getTempDir(); 
    301282public CapturePlayback(String subject,  
     
    359340        this.helpPageURL = helpPageURL; 
    360341        this.cookie = cookie; 
    361         this.compressionMode = defaultCompressionMode; 
    362342         
    363343        capturePlayback = this; 
     
    17591739            CompressionMonitor compressionMonitor = new CompressionMonitor(); 
    17601740 
    1761             switch(compressionMode){ 
    1762                 case 1: 
    1763                     encoder.mode = 0; // 0 = narrowband, 1 = wideband, 2 = ultrawide 
    1764                     encoder.vbr_quality = 3; 
    1765                     encoder.complexity = 6; 
    1766                     break; 
    1767                 case 2: 
    1768                     encoder.mode = 0; // 0 = narrowband, 1 = wideband, 2 = ultrawide 
    1769                     encoder.vbr_quality = 8; 
    1770                     encoder.complexity = 8; 
    1771                     break; 
    1772                 case 3: 
    1773                     encoder.mode = 1; // 0 = narrowband, 1 = wideband, 2 = ultrawide 
    1774                     encoder.vbr_quality = 9; 
    1775                     encoder.complexity = 10; 
    1776                     break; 
    1777             } 
    17781741 
    17791742            encoder.sampleRate = (int)format.getSampleRate();