Mercurial > hg > env-test-daniele
view templates.py @ 11:15260ae0d6bc
• modified html templates for audio environment classification experiment (10 audio files and 10 classes for each test page)
• modidfied cherryFxTest to be consistent with audio templates and to include files from AASPAudio
• included AASPAudio (recordings for audio environment classification)
author | Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk> |
---|---|
date | Mon, 11 Mar 2013 13:31:44 +0000 |
parents | 032bc65ebafc |
children | 8a595d55e245 |
line wrap: on
line source
audiotempl= ''' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <html lang="en" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8;charset=utf-8" > <! link rel="stylesheet" href="../build/mediaelementplayer.min.css" TITLE="combined"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Audio Environment Classification</title> <script src="../build/jquery.js"></script> <!script src="../build/mediaelement-and-player.min.js"></script> <script language = "JavaScript"> window.onload = function () { document.getElementById("a1")[%i].selected = true; document.getElementById("a2")[%i].selected = true; document.getElementById("a3")[%i].selected = true; document.getElementById("a4")[%i].selected = true; document.getElementById("a5")[%i].selected = true; document.getElementById("a6")[%i].selected = true; document.getElementById("a7")[%i].selected = true; document.getElementById("a8")[%i].selected = true; document.getElementById("a9")[%i].selected = true; document.getElementById("a10")[%i].selected = true; } </script> <script language="JavaScript" src="../js/gen_validatorv4.js" type="text/javascript" xml:space="preserve"></script> </head> <body> <h3 id="test 1">%i/%i</h3><br> <h4>Please play the sounds and indicate where they have been recorded </h4> <form name="attributes" action="doAttrib" method="POST"> <audio id="audio player 1" controls> <source src="../AASPAudio/%s.wav" type="audio/wav"> </audio> <form name = "attribute1" id="a1"> <input type="radio" name="cat" value="bus">bus <input type="radio" name="cat" value="busy street">busy street <input type="radio" name="cat" value="office">office <input type="radio" name="cat" value="open air market">open air market <input type="radio" name="cat" value="park">park <br> <input type="radio" name="cat" value="quiet street">quiet street <input type="radio" name="cat" value="restaurant">restaurant <input type="radio" name="cat" value="supermarket">supermarket <input type="radio" name="cat" value="tube">tube <input type="radio" name="cat" value="tube station">tube station </form> <br> <audio id="audio player 2" controls> <source src="/Users/daniele/Documents/AASPChallenge/survey/AASPAudio/%s.wav" type="audio/wav"> </audio> <form name = "attribute2" id="a2"> <input type="radio" name="cat" value="bus">bus <input type="radio" name="cat" value="busy street">busy street <input type="radio" name="cat" value="office">office <input type="radio" name="cat" value="open air market">open air market <input type="radio" name="cat" value="park">park <br> <input type="radio" name="cat" value="quiet street">quiet street <input type="radio" name="cat" value="restaurant">restaurant <input type="radio" name="cat" value="supermarket">supermarket <input type="radio" name="cat" value="tube">tube <input type="radio" name="cat" value="tube station">tube station </form> <br> <audio id="audio player 3" controls> <source src="/Users/daniele/Documents/AASPChallenge/survey/AASPAudio/%s.wav" type="audio/wav"> </audio> <form name = "attribute3" id="a3"> <input type="radio" name="cat" value="bus">bus <input type="radio" name="cat" value="busy street">busy street <input type="radio" name="cat" value="office">office <input type="radio" name="cat" value="open air market">open air market <input type="radio" name="cat" value="park">park <br> <input type="radio" name="cat" value="quiet street">quiet street <input type="radio" name="cat" value="restaurant">restaurant <input type="radio" name="cat" value="supermarket">supermarket <input type="radio" name="cat" value="tube">tube <input type="radio" name="cat" value="tube station">tube station </form> <br> <audio id="audio player 4" controls> <source src="/Users/daniele/Documents/AASPChallenge/survey/AASPAudio/%s.wav" type="audio/wav"> </audio> <form name = "attribute4" id="a4"> <input type="radio" name="cat" value="bus">bus <input type="radio" name="cat" value="busy street">busy street <input type="radio" name="cat" value="office">office <input type="radio" name="cat" value="open air market">open air market <input type="radio" name="cat" value="park">park <br> <input type="radio" name="cat" value="quiet street">quiet street <input type="radio" name="cat" value="restaurant">restaurant <input type="radio" name="cat" value="supermarket">supermarket <input type="radio" name="cat" value="tube">tube <input type="radio" name="cat" value="tube station">tube station </form> <br> <audio id="audio player 5" controls> <source src="/Users/daniele/Documents/AASPChallenge/survey/AASPAudio/%s.wav" type="audio/wav"> </audio> <form name = "attribute5" id="a5"> <input type="radio" name="cat" value="bus">bus <input type="radio" name="cat" value="busy street">busy street <input type="radio" name="cat" value="office">office <input type="radio" name="cat" value="open air market">open air market <input type="radio" name="cat" value="park">park <br> <input type="radio" name="cat" value="quiet street">quiet street <input type="radio" name="cat" value="restaurant">restaurant <input type="radio" name="cat" value="supermarket">supermarket <input type="radio" name="cat" value="tube">tube <input type="radio" name="cat" value="tube station">tube station </form> <br> <audio id="audio player 6" controls> <source src="/Users/daniele/Documents/AASPChallenge/survey/AASPAudio/%s.wav" type="audio/wav"> </audio> <form name = "attribute6" id="a6"> <input type="radio" name="cat" value="bus">bus <input type="radio" name="cat" value="busy street">busy street <input type="radio" name="cat" value="office">office <input type="radio" name="cat" value="open air market">open air market <input type="radio" name="cat" value="park">park <br> <input type="radio" name="cat" value="quiet street">quiet street <input type="radio" name="cat" value="restaurant">restaurant <input type="radio" name="cat" value="supermarket">supermarket <input type="radio" name="cat" value="tube">tube <input type="radio" name="cat" value="tube station">tube station </form> <br> <audio id="audio player 7" controls> <source src="/Users/daniele/Documents/AASPChallenge/survey/AASPAudio/%s.wav" type="audio/wav"> </audio> <form name = "attribute7" id="a7"> <input type="radio" name="cat" value="bus">bus <input type="radio" name="cat" value="busy street">busy street <input type="radio" name="cat" value="office">office <input type="radio" name="cat" value="open air market">open air market <input type="radio" name="cat" value="park">park <br> <input type="radio" name="cat" value="quiet street">quiet street <input type="radio" name="cat" value="restaurant">restaurant <input type="radio" name="cat" value="supermarket">supermarket <input type="radio" name="cat" value="tube">tube <input type="radio" name="cat" value="tube station">tube station </form> <br> <audio id="audio player 8" controls> <source src="/Users/daniele/Documents/AASPChallenge/survey/AASPAudio/%s.wav" type="audio/wav"> </audio> <form name = "attribute8" id="a8"> <input type="radio" name="cat" value="bus">bus <input type="radio" name="cat" value="busy street">busy street <input type="radio" name="cat" value="office">office <input type="radio" name="cat" value="open air market">open air market <input type="radio" name="cat" value="park">park <br> <input type="radio" name="cat" value="quiet street">quiet street <input type="radio" name="cat" value="restaurant">restaurant <input type="radio" name="cat" value="supermarket">supermarket <input type="radio" name="cat" value="tube">tube <input type="radio" name="cat" value="tube station">tube station </form> <br> <audio id="audio player 9" controls> <source src="/Users/daniele/Documents/AASPChallenge/survey/AASPAudio/%s.wav" type="audio/wav"> </audio> <form name = "attribute9" id="a9"> <input type="radio" name="cat" value="bus">bus <input type="radio" name="cat" value="busy street">busy street <input type="radio" name="cat" value="office">office <input type="radio" name="cat" value="open air market">open air market <input type="radio" name="cat" value="park">park <br> <input type="radio" name="cat" value="quiet street">quiet street <input type="radio" name="cat" value="restaurant">restaurant <input type="radio" name="cat" value="supermarket">supermarket <input type="radio" name="cat" value="tube">tube <input type="radio" name="cat" value="tube station">tube station </form> <br> <audio id="audio player 10" controls> <source src="/Users/daniele/Documents/AASPChallenge/survey/AASPAudio/%s.wav" type="audio/wav"> </audio> <form name = "attribute10" id="a10"> <input type="radio" name="cat" value="bus">bus <input type="radio" name="cat" value="busy street">busy street <input type="radio" name="cat" value="office">office <input type="radio" name="cat" value="open air market">open air market <input type="radio" name="cat" value="park">park <br> <input type="radio" name="cat" value="quiet street">quiet street <input type="radio" name="cat" value="restaurant">restaurant <input type="radio" name="cat" value="supermarket">supermarket <input type="radio" name="cat" value="tube">tube <input type="radio" name="cat" value="tube station">tube station </form> <br> <input type="hidden" name="pageId" value="%i"> <input type="hidden" name="sessionId" value="%s"> <input type="submit" value="submit" name="submitButton"/> </form> <script language="JavaScript" type="text/javascript" xml:space="preserve">//<![CDATA[ var frmvalidator = new Validator("attributes"); frmvalidator.addValidation("attribute1","dontselect=0", "Please select at least one main attribute for each item"); frmvalidator.addValidation("attribute2","dontselect=0", "Please select at least one main attribute for each item"); frmvalidator.addValidation("attribute3","dontselect=0", "Please select at least one main attribute for each item"); frmvalidator.addValidation("attribute4","dontselect=0", "Please select at least one main attribute for each item"); frmvalidator.addValidation("attribute5","dontselect=0", "Please select at least one main attribute for each item"); frmvalidator.addValidation("attribute6","dontselect=0", "Please select at least one main attribute for each item"); frmvalidator.addValidation("attribute7","dontselect=0", "Please select at least one main attribute for each item"); frmvalidator.addValidation("attribute8","dontselect=0", "Please select at least one main attribute for each item"); frmvalidator.addValidation("attribute9","dontselect=0", "Please select at least one main attribute for each item"); frmvalidator.addValidation("attribute10","dontselect=0", "Please select at least one main attribute for each item"); //]]></script> </div> </div> </body> <script> $('audio,video').mediaelementplayer(); </script> </html> ''' welcome_templ= ''' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <html lang="en" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8;charset=utf-8" > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Environment Classification</title> <script language="JavaScript" src="../js/gen_validatorv4.js" type="text/javascript" xml:space="preserve"></script> </head> <body> <div id="mainPicture"> <div class="picture"> <div id="headerTitle">Environment Classification - Listening test</div> </div> <div class="contentBox"> <h2>Welcome!</h2><br /> <br /> <br /> <form name="userinfos" action="doStart" method="POST"> <div class="selects"> </p> Select Username<br /> <input type="text" name="uinfo00" id="uinfo00" /> <br /><br /> Age<br /> <select name="uinfo01" id="uinfo01"> <option value="0"></option> <option value="1">< 18</option> <option value="2">18-24</option> <option value="3">25-34</option> <option value="4">35-44</option> <option value="5">45-54</option> <option value="5">55-64</option> <option value="6">65-74</option> <option value="7">> 74</option> </select> <br /><br /> It is encouraged to use high quality headphones for this test. However, if you use loudspeakers instead make sure you're in the correct position between the speakers in order to evaluate stereo effects. Please specify (the closest to) your listening conditions: <br /> <select name="info1" id="info1"> <option value="0"></option> <option value="1">high quality headphones</option> <option value="2">low quality headphones</option> <option value="3">loudspeakers / professional studio</option> <option value="4">loudspeakers / semi-professional studio</option> <option value="5">hifi speakers / home</option> </select> <input type="hidden" name="pageId" value="0"> <input type="hidden" name="sessionId" value="%s"> <input type="submit" value="submit" name="startButton"> </p> </form> <script language="JavaScript" type="text/javascript" xml:space="preserve">//<![CDATA[ var frmvalidator = new Validator("userinfos"); frmvalidator.addValidation("uinfo00","req","Please select a username"); frmvalidator.addValidation("uinfo00","maxlen=20", "Max length for username is 20"); frmvalidator.addValidation("uinfo00","minlen=3", "Min length for username is 3"); frmvalidator.addValidation("uinfo01","dontselect=0", "Please specify all information"); frmvalidator.addValidation("info1","dontselect=0", "Please specify all information"); //]]></script> </div> <br /> <h3>Thank you for participating in this project!</h3><br /> </div> </body> </html> ''' endtempl = ''' <!DOCTYPE html> <html lang="en" dir="ltr"> <head> </head> <body> <p>results</p> <table border="1"> <tr> <th>Audio File</th> <th>Main 1</th> <th>Main 2</th> <th>Other 1</th> <th>Other 2</th> </tr> %s </table> <p> <a href="http://www.elec.qmul.ac.uk/digitalmusic">thanks!</a> </p> </body> </html> ''' #<p> <a href="/out/">thanks!</a> </p> endtempl2 = ''' <tr> <td>%s</td> <td><center>%s</center></td> <td><center>%s</center></td> <td><center>%s</center></td> <td><center>%s</center></td> </tr> '''