Changeset 2356
- Timestamp:
- 11/17/07 16:11:00 (11 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Trunk/SpeechSubmission/VFSpeechSubmission/java/src/speechrecorder/CapturePlayback.java
r2353 r2356 100 100 AudioInputStream audioInputStream; 101 101 SamplingGraph samplingGraph; 102 JButton uploadB; 103 JButton moreInfoB; 104 JButton aboutB; 102 105 103 JButton play1; 106 104 JButton capt1; … … 123 121 JButton play10; 124 122 JButton capt10; 125 JCheckBox acceptLicenseCB; 123 JButton uploadB; 124 JButton moreInfoB; 125 JButton aboutB; 126 126 127 127 boolean play1_state; … … 179 179 private File wavFile4; 180 180 private File wavFile5; 181 private File wavFile6; 182 private File wavFile7; 183 private File wavFile8; 184 private File wavFile9; 185 private File wavFile10; 181 186 private File uploadWavFile1; 182 187 private File uploadWavFile2; … … 184 189 private File uploadWavFile4; 185 190 private File uploadWavFile5; 186 private File wavFile6;187 private File wavFile7;188 private File wavFile8;189 private File wavFile9;190 private File wavFile10;191 191 private File uploadWavFile6; 192 192 private File uploadWavFile7; … … 217 217 String prompt4; 218 218 String prompt5; 219 String prompt6; 220 String prompt7; 221 String prompt8; 222 String prompt9; 223 String prompt10; 219 224 String promptID1; 220 225 String promptID2; … … 222 227 String promptID4; 223 228 String promptID5; 224 String prompt6;225 String prompt7;226 String prompt8;227 String prompt9;228 String prompt10;229 229 String promptID6; 230 230 String promptID7; … … 247 247 String genderPanelLabel = labels.genderPanelLabel; 248 248 JComboBox genderChooser; 249 String male = labels.male; 250 String female = labels.female; 251 String[] genderSelection = {pleaseSelect,male, female}; 249 String[] genderSelection = labels.genderSelection; 252 250 String gender = notApplicable; 253 251 254 252 String ageRangePanelLabel = labels.ageRangePanelLabel; 255 253 JComboBox ageRangeChooser; 256 String youth = labels.youth; 257 String adult = labels.adult; 258 String senior = labels.senior; 259 String[] ageSelection = {pleaseSelect ,youth, adult, senior }; 254 String[] ageSelection = labels.ageSelection; 260 255 String ageRange = notApplicable; 261 256 262 String dialectPanelLabel = "Pronunciation Dialect:"; 263 JComboBox dialectChooser; 264 String dialect1 = labels.dialect1; 265 String dialect2 =labels.dialect2; 266 String dialect3 = labels.dialect3; 267 String dialect4 = labels.dialect4; 268 String dialect5 = labels.dialect5; 269 String dialect6 = labels.dialect6; 270 String dialect7 = labels.dialect7; 271 String dialect8 = labels.dialect8; 272 String dialect9 = labels.dialect9; 273 String dialect10 = labels.dialect10; 274 String otherDialect = labels.otherDialect; 275 String[] dialectSelection = {pleaseSelect,dialect1, dialect2, dialect3, dialect4, dialect5, dialect6, dialect7, otherDialect}; 276 String dialect = notApplicable; 277 278 String microphonePanelLabel = "Microphone Type:"; 257 String dialectPanelLabel = labels.dialectPanelLabel; 258 JComboBox dialectChooser; 259 String dialect = notApplicable; // default selection 260 String[] dialectSelection = labels.dialectSelection; 261 262 String microphonePanelLabel = labels.microphonePanelLabel; 279 263 JComboBox microphoneChooser; 280 String headset = labels.headset; 281 String USBheadset = labels.USBheadset; 282 String desktopBoom = labels.desktopBoom; 283 String USBdesktopBoom = labels.USBdesktopBoom; 284 String laptopBuiltin = labels.laptopBuiltin; 285 String webcam = labels.webcam; 286 String studio = labels.studio; 287 String otherMic = labels.otherMic; 288 String[] microphonetSelection = {pleaseSelect,headset,USBheadset, desktopBoom, USBdesktopBoom, laptopBuiltin, webcam, studio, otherMic}; 264 String[] microphoneSelection = labels.microphoneSelection; 289 265 String microphone = notApplicable; 290 266 … … 485 461 genderChooser.addActionListener(new ActionListener(){ 486 462 public void actionPerformed(ActionEvent e){ 487 String choice = (String)genderChooser.getSelectedItem(); 488 if(choice.equals(male)){ 489 gender = (male); 490 }else if(choice.equals(female)){ 491 gender = (female); 492 }else if(choice.equals(pleaseSelect)){ 493 gender = (notApplicable); 494 }else { 495 gender = (notApplicable); 496 } 463 String gender = (String)genderChooser.getSelectedItem(); 497 464 } 498 465 }); … … 507 474 ageRangeChooser.addActionListener(new ActionListener(){ 508 475 public void actionPerformed(ActionEvent e){ 509 String choice = (String)ageRangeChooser.getSelectedItem(); 510 if(choice.equals(youth)){ 511 ageRange = (youth); 512 }else if(choice.equals(adult)){ 513 ageRange = (adult); 514 }else if(choice.equals(senior)){ 515 ageRange = (senior); 516 }else if(choice.equals(pleaseSelect)){ 517 ageRange = (notApplicable); 518 }else { 519 ageRange = (notApplicable); 520 } 476 String ageRange = (String)ageRangeChooser.getSelectedItem(); 521 477 } 522 478 }); … … 529 485 dialectChooser.setSelectedIndex(0); 530 486 dialectChooser.addActionListener(new ActionListener(){ 531 public void actionPerformed(ActionEvent e){ 532 String choice = (String)dialectChooser.getSelectedItem(); 533 if(choice.equals(dialect1)){ 534 dialect = (dialect1); 535 }else if (choice.equals(dialect2)){ 536 dialect = (dialect2); 537 }else if(choice.equals(dialect3)){ 538 dialect = (dialect3); 539 }else if(choice.equals(dialect4)){ 540 dialect = (dialect4); 541 }else if(choice.equals(dialect5)){ 542 dialect = (dialect5); 543 }else if(choice.equals(dialect6)){ 544 dialect = (dialect6); 545 }else if(choice.equals(dialect7)){ 546 dialect = (dialect7); 547 }else if(choice.equals(dialect8)){ 548 dialect = (dialect8); 549 }else if(choice.equals(dialect9)){ 550 dialect = (dialect9); 551 }else if(choice.equals(dialect10)){ 552 dialect = (dialect10); 553 }else if(choice.equals(otherDialect)){ 554 dialect = (otherDialect); 555 }else if(choice.equals(pleaseSelect)){ 556 dialect = (notApplicable); 557 }else { 558 dialect = (notApplicable); 559 } 560 } 561 }); 487 public void actionPerformed(ActionEvent e){ 488 dialect = (String)dialectChooser.getSelectedItem(); 489 } 490 }); 562 491 p2.add(dialectPanel); 563 492 // ############ Microphone Type: #################################### … … 565 494 microphonePanel.setLayout(new FlowLayout(FlowLayout.CENTER)); 566 495 microphonePanel.add(new JLabel(microphonePanelLabel)); 567 microphonePanel.add(microphoneChooser = new JComboBox(microphone tSelection));496 microphonePanel.add(microphoneChooser = new JComboBox(microphoneSelection)); 568 497 microphoneChooser.setSelectedIndex(0); 569 498 // microphoneChooser.setEditable(true); // user can add whatever they want ... 570 499 microphoneChooser.addActionListener(new ActionListener(){ 571 500 public void actionPerformed(ActionEvent e){ 572 String choice = (String)dialectChooser.getSelectedItem(); 573 if(choice.equals(headset)){ 574 microphone = (headset); 575 }else if (choice.equals(USBheadset)){ 576 microphone = (USBheadset); 577 }else if (choice.equals(desktopBoom)){ 578 microphone = (desktopBoom); 579 }else if (choice.equals(USBdesktopBoom)){ 580 microphone = (USBdesktopBoom); 581 }else if(choice.equals(laptopBuiltin)){ 582 microphone = (laptopBuiltin); 583 }else if(choice.equals(webcam)){ 584 microphone = (webcam); 585 }else if(choice.equals(studio)){ 586 microphone = (studio); 587 }else if(choice.equals(otherMic)){ 588 microphone = (otherMic); 589 }else if(choice.equals(pleaseSelect)){ 590 microphone = (notApplicable); 591 }else { 592 microphone = (notApplicable); 593 } 501 String microphone = (String)dialectChooser.getSelectedItem(); 594 502 } 595 503 }); Trunk/SpeechSubmission/VFSpeechSubmission/java/src/speechrecorder/LabelLocalizer.java
r2355 r2356 12 12 13 13 String genderPanelLabel; 14 String male; 15 String female; 14 String genderSelection []; 16 15 17 16 String ageRangePanelLabel; 18 String youth; 19 String adult; 20 String senior; 17 String ageSelection []; 21 18 22 19 String dialectPanelLabel; 23 String dialect1; 24 String dialect2; 25 String dialect3; 26 String dialect4; 27 String dialect5; 28 String dialect6; 29 String dialect7; 30 String dialect8; 31 String dialect9; 32 String dialect10; 33 String otherDialect; 20 String dialectSelection []; 34 21 35 22 String microphonePanelLabel; 36 String headset; 37 String USBheadset; 38 String desktopBoom; 39 String USBdesktopBoom; 40 String laptopBuiltin; 41 String webcam; 42 String studio; 43 String otherMic; 23 String microphoneSelection []; 44 24 45 25 String uploadText; … … 79 59 pleaseSelect = "Please Select"; 80 60 notApplicable = "unknown"; 81 61 82 62 genderPanelLabel = "Gender:"; 83 male = "Male"; 84 female = "Female"; 85 63 genderSelection = new String [3]; 64 genderSelection[0] = pleaseSelect; 65 genderSelection[1] = "Male"; 66 genderSelection[2] = "Female"; 67 86 68 ageRangePanelLabel = "Age Range:"; 87 youth = "Youth"; 88 adult = "Adult"; 89 senior = "Senior"; 69 ageSelection = new String [4]; 70 ageSelection[0] = pleaseSelect; 71 ageSelection[1] = "Youth"; 72 ageSelection[2] = "Adult"; 73 ageSelection[3] = "Senior"; 90 74 91 75 dialectPanelLabel = "Pronunciation Dialect:"; 92 dialect1 = "Australian English"; 93 dialect2 = "American English"; 94 dialect3 = "British English"; 95 dialect4 = "Canadian English"; 96 dialect5 = "European English"; 97 dialect6 = "New Zealand English"; 98 dialect7 = "South African English"; 99 dialect8 = ""; 100 dialect9 = ""; 101 dialect10 = ""; 102 otherDialect = "Other"; 76 dialectSelection = new String [9]; 77 dialectSelection[0] = pleaseSelect; 78 dialectSelection[1] = "Australian English"; 79 dialectSelection[2] = "American English"; // other 80 dialectSelection[3] = "British English"; 81 dialectSelection[4] = "Canadian English"; 82 dialectSelection[5] = "European English"; 83 dialectSelection[6] = "New Zealand English"; 84 dialectSelection[7] = "South African English"; 85 dialectSelection[8] = "Other"; 103 86 104 87 microphonePanelLabel = "Microphone Type:"; 105 headset = "Headset mic"; 106 USBheadset = "USB Headset mic"; 107 desktopBoom = "Desktop Boom mic"; 108 USBdesktopBoom = "USB Desktop Boom mic"; 109 laptopBuiltin = "Laptop Built-in mic"; 110 webcam = "WebCam mic"; 111 studio = "Studio mic"; 112 otherMic = "Other"; 88 microphoneSelection = new String [9]; 89 microphoneSelection[0] = pleaseSelect; 90 microphoneSelection[1] = "Headset mic"; 91 microphoneSelection[2] = "USB Headset mic"; 92 microphoneSelection[3] = "Desktop Boom mic"; 93 microphoneSelection[4] = "USB Desktop Boom mic"; 94 microphoneSelection[5] = "Laptop Built-in mic"; 95 microphoneSelection[6] = "WebCam mic"; 96 microphoneSelection[7] = "Studio mic"; 97 microphoneSelection[8] = "Other"; 113 98 114 99 uploadText = "<html>By clicking the \"Upload\" button, you agree to assign the Copyright to your recorded speech to <br> " … … 136 121 137 122 } 123 138 124 private void Dutch() { 139 125 usernamePanelLabel = "Gebruikersnaam:"; … … 147 133 148 134 genderPanelLabel = "geslacht:"; 149 male = "mannelijk"; 150 female = "vrouwelijk"; 135 genderSelection = new String [3]; 136 genderSelection[0] = pleaseSelect; 137 genderSelection[1] = "mannelijk"; 138 genderSelection[2] = "vrouwelijk"; 151 139 152 140 ageRangePanelLabel = "leeftijd:"; 153 youth = "jeugd"; 154 adult = "volwassen"; 155 senior = "senior"; 156 157 dialectPanelLabel = "dialect:"; 158 dialect1 = "standaard Nederlands"; 159 dialect2 = ""; 160 dialect3 = ""; 161 dialect4 = ""; 162 dialect5 = ""; 163 dialect6 = ""; 164 dialect7 = ""; 165 dialect8 = ""; 166 dialect9 = ""; 167 dialect10 = ""; 168 otherDialect = "anders"; 169 141 ageSelection = new String [4]; 142 ageSelection[0] = pleaseSelect; 143 ageSelection[1] = "jeugd"; 144 ageSelection[2] = "volwassen"; 145 ageSelection[3] = "senior"; 146 147 dialectPanelLabel = "dialect:"; 148 dialectSelection = new String [3]; 149 dialectSelection[0] = pleaseSelect; 150 dialectSelection[1] = "standaard Nederlands"; 151 dialectSelection[2] = "anders"; // other 152 170 153 microphonePanelLabel = "type microfoon:"; 171 headset = "headsetmicrofoon"; 172 USBheadset = "headsetmicrofoon (USB)"; 173 desktopBoom = "bureaumicrofoon"; 174 USBdesktopBoom = "bureaumicrofoon (USB)"; 175 laptopBuiltin = "microfoon in laptop"; 176 webcam = "webcam microfoon"; 177 studio = "studiomicrofoon"; 178 otherMic = "anders"; 154 microphoneSelection = new String [9]; 155 microphoneSelection[0] = pleaseSelect; 156 microphoneSelection[1] = "headsetmicrofoon"; 157 microphoneSelection[2] = "headsetmicrofoon (USB)"; 158 microphoneSelection[3] = "bureaumicrofoon"; 159 microphoneSelection[4] = "bureaumicrofoon (USB)"; 160 microphoneSelection[5] = "microfoon in laptop"; 161 microphoneSelection[6] = "webcam microfoon"; 162 microphoneSelection[7] = "studiomicrofoon"; 163 microphoneSelection[8] = "anders"; // other 179 164 180 165 uploadText = "<html>druk op de knop \"doneren\" om het auteursrecht in de opgenomen <br>" +