Changeset 2366
- Timestamp:
- 12/02/07 22:50:16 (10 months ago)
- Files:
-
- Trunk/SpeechSubmission/VFSpeechSubmission/java/src/speechrecorder/CapturePlayback.java (modified) (3 diffs)
- Trunk/SpeechSubmission/VFSpeechSubmission/java/src/speechrecorder/LabelLocalizer.java (modified) (4 diffs)
- Trunk/SpeechSubmission/VFSpeechSubmission/java/src/speechrecorder/License.java (modified) (3 diffs)
- Trunk/SpeechSubmission/VFSpeechSubmission/server/LocalSubmitSpeech.php (deleted)
- Trunk/SpeechSubmission/VFSpeechSubmission/server/WebGUI/SpeechSubmission.pm (modified) (1 diff)
- Trunk/SpeechSubmission/VFSpeechSubmission/server/fileList.php (added)
- Trunk/SpeechSubmission/VFSpeechSubmission/server/javaUploadServer.php (modified) (3 diffs)
- Trunk/SpeechSubmission/VFSpeechSubmission/server/localSubmitSpeech.php (added)
- Trunk/SpeechSubmission/VFSpeechSubmission/server/localSubmitSpeechServer.php (moved) (moved from Trunk/SpeechSubmission/VFSpeechSubmission/server/LocalSubmitSpeechServer.php) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Trunk/SpeechSubmission/VFSpeechSubmission/java/src/speechrecorder/CapturePlayback.java
r2365 r2366 486 486 microphoneChooser.addActionListener(new ActionListener(){ 487 487 public void actionPerformed(ActionEvent e){ 488 microphone = (String) dialectChooser.getSelectedItem();488 microphone = (String)microphoneChooser.getSelectedItem(); 489 489 } 490 490 }); … … 1235 1235 // \w A word character: [a-zA-Z_0-9] 1236 1236 // \W A non-word character: [^\w] 1237 userName = (usernameTextField.getText().replaceAll("\\W","")); 1237 // !!!!!! removed to debug php uploader 1238 // userName = (usernameTextField.getText().replaceAll("\\W","")); 1239 // !!!!!! 1238 1240 if (userName.length() == 0 ) { 1239 1241 userName = "anonymous"; … … 1788 1790 out_readme.write("Gender: " + gender + System.getProperty("line.separator") ); 1789 1791 out_readme.write("Age Range: " + ageRange + System.getProperty("line.separator")); 1792 out_readme.write("Language: " + language + System.getProperty("line.separator")); 1790 1793 out_readme.write("Pronunciation dialect: " + dialect + System.getProperty("line.separator")); 1791 1794 out_readme.write(System.getProperty("line.separator")); Trunk/SpeechSubmission/VFSpeechSubmission/java/src/speechrecorder/LabelLocalizer.java
r2364 r2366 9 9 10 10 private String pleaseSelect; 11 private String other; 11 12 private String notApplicable; 12 13 … … 132 133 133 134 pleaseSelect = "Maak een keuze"; 135 other = "anders"; 134 136 notApplicable = "unknown"; 135 137 … … 148 150 149 151 dialectPanelLabel = "dialect:"; 150 dialectSelection = new String [ 3];152 dialectSelection = new String [10]; 151 153 dialectSelection[0] = pleaseSelect; 152 dialectSelection[1] = "standaard Nederlands"; 153 dialectSelection[2] = "anders"; // other 154 dialectSelection[1] = "algemeen Nederlands"; 155 dialectSelection[2] = "Zuidwestelijk"; 156 dialectSelection[3] = "Noordwestelijk"; 157 dialectSelection[4] = "Noordoostelijk"; 158 dialectSelection[5] = "Noordelijk-centraal"; 159 dialectSelection[6] = "Zuidoostelijk"; 160 dialectSelection[7] = "Surinaams-Nederlands"; 161 dialectSelection[8] = "Antiliaans-Nederlands"; 162 dialectSelection[9] = other; 154 163 155 164 microphonePanelLabel = "type microfoon:"; … … 163 172 microphoneSelection[6] = "webcam microfoon"; 164 173 microphoneSelection[7] = "studiomicrofoon"; 165 microphoneSelection[8] = "anders"; // other174 microphoneSelection[8] = other; 166 175 167 176 uploadText = "<html>druk op de knop \"doneren\" om het auteursrecht in de opgenomen <br>" + Trunk/SpeechSubmission/VFSpeechSubmission/java/src/speechrecorder/License.java
r2364 r2366 48 48 49 49 VFlicenseNotice = 50 "VoxForge Speech Submission Application v0.1.1 - allows a user to record their speech and " + System.getProperty("line.separator") 51 + " upload the recorded audio to the VoxForge server, so that it can be" + System.getProperty("line.separator") 52 + "incorporated into the VoxForge Speech Corpus and used in the creation of " + System.getProperty("line.separator") 53 + "GPL acoustic models." + System.getProperty("line.separator") + System.getProperty("line.separator") 54 55 + "Copyright (C) 2007 VoxForge" + System.getProperty("line.separator") + System.getProperty("line.separator") 56 50 "VoxForge Speech Submission Application v0.1.1" + System.getProperty("line.separator") 51 + "============================" + System.getProperty("line.separator") 52 + "Allows a user to record their speech and upload it to the VoxForge server" + System.getProperty("line.separator") 53 + "so that it can be incorporated into the VoxForge speech corpus and used" + System.getProperty("line.separator") 54 + "in the creation of GPL acoustic models." + System.getProperty("line.separator") 55 + System.getProperty("line.separator") 56 + "Notice:" + System.getProperty("line.separator") 57 + "====" + System.getProperty("line.separator") 58 + "Copyright (C) 2007 VoxForge" + System.getProperty("line.separator") 59 + System.getProperty("line.separator") 57 60 + "This program is free software: you can redistribute it and/or modify" + System.getProperty("line.separator") 58 61 + "them under the terms of the GNU General Public License as published by" + System.getProperty("line.separator") … … 68 71 + "along with these files. If not, see <http://www.gnu.org/licenses/>." + System.getProperty("line.separator") 69 72 + System.getProperty("line.separator") 70 + "This Java Applet incorporates open-source "+ System.getProperty("line.separator") 71 + "Java code from other projects:"+ System.getProperty("line.separator") 73 + "Acknowledgments:" + System.getProperty("line.separator") 74 + "===========" + System.getProperty("line.separator") 75 + "This Java Applet incorporates open-source Java code"+ System.getProperty("line.separator") 76 + "from other projects:"+ System.getProperty("line.separator") 72 77 + " - MoodleSpeex, (c) Dan Stowell 2006."+ System.getProperty("line.separator") 73 78 + " - JSpeex player/recorder, (c) Wimba S.A."+ System.getProperty("line.separator") … … 75 80 + " - JavaSoundDemo, (c) Sun Microsystems"+ System.getProperty("line.separator") 76 81 + "Please see the licences stored in the \"copyrights\" folder in the " + System.getProperty("line.separator") 77 + "speechsubmission jar file for more details."; 82 + "speechsubmission jar file for more details."+ System.getProperty("line.separator") 83 + System.getProperty("line.separator") 84 + "The English prompts are from the FestVox CMU_ARCTIC speech synthesis database."+ System.getProperty("line.separator") 85 + "(the utterances were selected from out-of-copyright texts from Project Gutenberg)"+ System.getProperty("line.separator") 86 + System.getProperty("line.separator") 87 + "Full GPL License:" + System.getProperty("line.separator") 88 + "=========" ; 78 89 79 90 gplLicense = " GNU GENERAL PUBLIC LICENSE" + System.getProperty("line.separator") Trunk/SpeechSubmission/VFSpeechSubmission/server/WebGUI/SpeechSubmission.pm
r2290 r2366 12 12 13 13 use strict; 14 14 use WebGUI::Session::Http; 15 15 #------------------------------------------------------------------- 16 16 sub process { 17 17 my $session = shift; 18 my $userID =$session->var->get("userId") || "test"; 19 my $output = '<applet name="Speexuploader" width ="800" height ="800" mayscript="mayscript" 20 code="moodlespeex/MoodleSpeexRecorderApplet.class" 21 codebase="http://www.repository.voxforge1.org/SubmitSpeech" style="border: 1px solid rgb(153,153,153);">'; 22 $output .= '<param name="archive" value="moodlespeex.jar"/>'; 23 $output .= '<param name="type" value="application/x-java-applet;version=1.4"/>'; 24 $output .= '<param name="scriptable" value="true"/>'; 25 $output .= '<param name="destination" value="http://www.repository.voxforge1.org/SubmitSpeech/javaUploadServer.php"/>'; 26 $output .= '<param name="endpage" value="http://www.repository.voxforge1.org/SubmitSpeech/endpage.html"/>'; 27 $output .= "<param name=\"cookie\" value=\"" . $$userID . "\"/>"; 28 $output .= '</applet>'; 18 19 my $username =$session->user->username || "test"; 20 my $http = WebGUI::Session::Http->new($session); 21 $http->setCookie("user","WebGUICookie",3600); 22 my $output = ' 23 <applet name="VoxForge.org Speech Submission Application" width ="825" height ="875" mayscript="mayscript" 24 code="speechrecorder/RecorderApplet.class" style="border: 1px solid rgb(153,153,153);"> 25 <param name="codebase" value="http://localhost:90/httpd/"/> 26 <param name="archive" value="speechrecorder.jar"/> 27 <param name="type" value="application/x-java-applet;version=1.4"/> 28 <param name="scriptable" value="true"/> 29 <param name="destination" value="http://localhost:90/httpd/javaUploadServer.php"/> 30 <param name="endpage" value="http://localhost:90/httpd/endpage.html"/> 31 <param name="cookie" value="$username"/> 32 </applet>'; 29 33 30 34 return $output; Trunk/SpeechSubmission/VFSpeechSubmission/server/javaUploadServer.php
r2330 r2366 25 25 // Note, this MUST have the trailing slash. 26 26 //$uploaddir = 'public/'; 27 $uploaddir = ' ../public/speechsubmissions/';27 $uploaddir = 'audiosubmissions/'; 28 28 // Whether or not to allow the upload of specific files 29 29 $allow_or_deny = true; … … 33 33 $file_extension_list = array("zip"); 34 34 // ----------------------------------------------------------------------------- 35 36 var_dump($_FILES); 37 35 38 if ($allow_or_deny){ 36 39 if (($allow_or_deny_method == "allow" && !in_array(strtolower(array_pop(explode('.', $_FILES['userfile']['name']))), $file_extension_list)) … … 47 50 } 48 51 } 49 if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir .$_FILES['userfile']['name'])) 52 // !!!!!! 53 // limits the length of the filename to 25 char 54 // removes non-alphanumeric characters from file name 55 // listfiles needs to remove random number 56 57 $newname = $_FILES['userfile']['name']; 58 $newname = ereg_replace ( "\.zip" , "" , $newname ); 59 $newname = substr($newname , 0, 25); 60 $newname = ereg_replace ( "[^a-zA-Z0-9_-]" , "" , $newname ); 61 62 $ran = rand () ; 63 $newname = $newname . "[" . $ran . "]" . ".zip"; 64 //$newname = $newname . " .zip"; 65 // !!!!!! 66 if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir .$newname)) 50 67 { 51 68 // All replies MUST start with "POSTLET REPLY", if they don't, then Postlet will Trunk/SpeechSubmission/VFSpeechSubmission/server/localSubmitSpeechServer.php
r2365 r2366 11 11 12 12 13 function speex_postlet_applet($destination, $endpage, $codebase, 14 $subject='', $filefieldname='userfile', $compressionmode=1, $compressionmodes='1,2,3'){ 13 function speex_postlet_applet($destination, $endpage, $codebase, $filefieldname='userfile'){ 15 14 global $CFG; 16 15 $cookie = htmlspecialchars($_SERVER['HTTP_COOKIE']); 17 16 $code = <<<ENDHTMLFRAGMENT 18 <applet name="VoxForge.org Speech Submission Application" width ="825" height =" 875" mayscript="mayscript"17 <applet name="VoxForge.org Speech Submission Application" width ="825" height ="950" mayscript="mayscript" 19 18 code="speechrecorder/RecorderApplet.class" style="border: 1px solid rgb(153,153,153);"> 20 19 <param name="codebase" value="$codebase"/> … … 25 24 <param name="endpage" value="$endpage"/> 26 25 <param name="cookie" value="$cookie"/> 26 <param name="language" value="NL"/> 27 27 <table style="background-color: rgb(255, 195, 1);" border="1" height="24" width="550"><tbody><tr><td> The VoxForge Speech Submission Applet should appear here. Please see the VoxForge <a href="http://www.voxforge.org/home/read2/java" color="ffffff">Java Troubleshooting Guide</a> to determine if you have Java installed on your PC - this is required in order to use the audio recorder.<br></td></tr></tbody></table> 28 28 … … 32 32 } 33 33 34 35 36 34 37 ?>