voxforge.org
VoxForge Dev

Changeset 2369

Show
Ignore:
Timestamp:
12/04/07 21:08:12 (1 year ago)
Author:
kmaclean
Message:

SpeechSubmission server code snapshot

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Trunk/SpeechSubmission/VFSpeechSubmission/server/SubmitSpeechServer.php

    r2331 r2369  
    1111 
    1212 
    13 function speex_postlet_applet($destination, $endpage,  $codebase, 
    14                 $subject='', $filefieldname='userfile', $compressionmode=1, $compressionmodes='1,2,3'){ 
     13function submitspeech_postlet_applet($language, $height, $filefieldname='userfile'){ 
    1514  global $CFG; 
     15//  $language = NL; 
     16//  $height = "925"; 
     17//  $language = EN; 
     18//  $height = "875"; 
     19 
    1620  $cookie = htmlspecialchars($_SERVER['HTTP_COOKIE']); 
    1721  $code =  <<<ENDHTMLFRAGMENT 
    18 <applet name="VoxForge.org Speech Submission Application" width ="825" height ="875" mayscript="mayscript" 
     22<applet name="VoxForge.org Speech Submission Application" width ="825" height =$height mayscript="mayscript" 
    1923      code="speechrecorder/RecorderApplet.class" style="border: 1px solid rgb(153,153,153);"> 
    20  <param name="codebase"  value="$codebase"/> 
     24 <param name="codebase"  value="http://read.voxforge1.org/r0_1_1/"/> 
    2125 <param name="archive"  value="speechrecorder.jar"/> 
    2226 <param name="type"  value="application/x-java-applet;version=1.4"/> 
    2327 <param name="scriptable"  value="true"/> 
    24 ENDHTMLFRAGMENT; 
    25  if($isforumpost) { 
    26    $code .= '<param name="subject"  value="'.htmlspecialchars($subject).'"/>'; 
    27  } 
    28   $code .=  <<<ENDHTMLFRAGMENT 
    29  <param name="destination" value="$destination"/> 
    30  <param name="filefieldname"  value=" 
    31 ENDHTMLFRAGMENT; 
    32   $code .= htmlspecialchars($filefieldname); 
    33   $code .=  <<<ENDHTMLFRAGMENT 
    34 "/> 
    35  <param name="endpage"  value="$endpage"/> 
     28 <param name="destination" value="http://read.voxforge1.org/r0_1_1/javaUploadServer.php"/> 
     29 <param name="endpage"  value="http://read.voxforge1.org/r0_1_1/endpage.php"/> 
    3630 <param name="cookie"  value="$cookie"/> 
    37  <param name="compressionmode"  value="$compressionmode"/> 
    38  <param name="compressionmodes"  value="$compressionmodes"/> 
     31 <param name="language"  value="$language"/> 
    3932<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> 
    4033 
  • Trunk/SpeechSubmission/VFSpeechSubmission/server/SubmitSpeechWebGUI-EN.php

    r2331 r2369  
    1010require_once('SubmitSpeechServer.php'); 
    1111 
    12 echo speex_postlet_applet( 
    13 'http://read.voxforge1.org/javaUploadServer.php',  
    14 'http://read.voxforge1.org/endpage.php', 
    15 'http://read.voxforge1.org' 
    16      ); 
     12echo submitspeech_postlet_applet( 
     13'EN',  
     14'875' 
     15); 
    1716 
    1817?> 
  • Trunk/SpeechSubmission/VFSpeechSubmission/server/endpage.php

    r2330 r2369  
    170170</table> 
    171171</br></br> 
     172 
    172173<?PHP 
    173  
    174174//define the path as relative 
    175 $path = "../public/speechsubmissions/"; 
    176  
    177 //using the opendir function 
     175// DEBUG  $path = "./audiosubmissions/"; 
     176$path = "../../public/speechsubmissions/"; 
     177 
    178178$dir_handle = @opendir($path) or die("Unable to open $path"); 
    179179echo "<b>Speech Submissions Awaiting Processing</b><br/>"; 
    180180echo "===========================<br/>"; 
    181 //running the while loop 
     181 
     182$fileList[]=""; //create global variable?? 
    182183while (false !== ($file = readdir($dir_handle))) { 
    183184    if ($file != "." && $file != "..") { 
    184         echo "$file<br>"; 
     185        $file =  ereg_replace  (  "\[.*\]"  , ""  , $file  ); 
     186        global $filelist; 
     187            $fileList[] = $file; 
    185188    } 
    186189} 
     190 
     191sort($fileList); 
     192 
     193foreach ($fileList as $key => $val) { 
     194        if ($val != "") { 
     195                echo "$val<br>"; 
     196        } 
     197} 
     198 
    187199echo "===========================<br/>"; 
    188 //closing the directory 
     200 
    189201closedir($dir_handle); 
    190202?>  
     203 
    191204 
    192205<br><br> 
  • Trunk/SpeechSubmission/VFSpeechSubmission/server/fileList.php

    r2366 r2369  
    22 
    33//define the path as relative 
    4 $path = "./audiosubmissions/"; 
    5 //$path = "../public/speechsubmissions/"; 
     4// DEBUG  $path = "./audiosubmissions/"; 
     5$path = "../../public/speechsubmissions/"; 
    66 
    77$dir_handle = @opendir($path) or die("Unable to open $path"); 
  • Trunk/SpeechSubmission/VFSpeechSubmission/server/javaUploadServer.php

    r2368 r2369  
    2424// or "c:\php\uploads\" 
    2525// Note, this MUST have the trailing slash. 
    26 //$uploaddir = 'public/'; 
    27 $uploaddir = 'audiosubmissions/'
     26// DEBUG   $uploaddir = 'audiosubmissions/'; 
     27$uploaddir = "../../public/speechsubmissions/"
    2828// Whether or not to allow the upload of specific files 
    2929$allow_or_deny = true;