Difference between revisions of "Web-based perception experiments"

From Phonlab
Jump to navigationJump to search
Line 3: Line 3:
 
An example is here: [http://linguistics.berkeley.edu/~kjohnson/talkers/memory.php?list=test example experiment]
 
An example is here: [http://linguistics.berkeley.edu/~kjohnson/talkers/memory.php?list=test example experiment]
   
A Javascript library [http://linguistics.berkeley.edu/~kjohnson/talkers/js/audexp.js audexp.js] that makes it realatively easy to implement the following four kinds of typical experiment:
+
A Javascript library [http://linguistics.berkeley.edu/~kjohnson/talkers/js/audexp.js audexp.js] makes it realatively easy to implement the following four kinds of typical experiment:
   
 
* Identification - a single audio file is played, and a two-alternative forced choice (2AFC) is given.
 
* Identification - a single audio file is played, and a two-alternative forced choice (2AFC) is given.
Line 18: Line 18:
 
** here's an [http://linguistics.berkeley.edu/~kjohnson/talkers/js/blocktest_list.js example] of such a file
 
** here's an [http://linguistics.berkeley.edu/~kjohnson/talkers/js/blocktest_list.js example] of such a file
 
** this .js file was created with a small [http://linguistics.berkeley.edu/~kjohnson/talkers/js/make_wordlist.prl perl script] from a .csv spreadsheet.
 
** this .js file was created with a small [http://linguistics.berkeley.edu/~kjohnson/talkers/js/make_wordlist.prl perl script] from a .csv spreadsheet.
** the html header contains these two lines to get the audexp.js library and the experiment-specific
+
** the html header contains these two lines to get the audexp.js library and the experiment-specific list of sound files.
   
<script src="js/blocktest_list.js"></script>
+
::<script src="js/blocktest_list.js"></script>
  +
::<script src="js/blocktest_list.js"></script>
   
 
<body onload="load('id',false,500,2000);">
 
<body onload="load('id',false,500,2000);">

Revision as of 18:19, 8 February 2018

Experiments can be hosted on the Department of Linguistics server, and then distributed to listeners by email link, or via Amazon Mechanical Turk.

An example is here: example experiment

A Javascript library audexp.js makes it realatively easy to implement the following four kinds of typical experiment:

  • Identification - a single audio file is played, and a two-alternative forced choice (2AFC) is given.
  • Discrimination - two audio files are played, and a 2AFC is given.
  • Rating - a single audio file is played, and a rating number (from 1 to 7) is given.
  • Contrast Rating - two audio files are played, and a rating number is given.


Your html code must have three features:

  • source a javascript file that defines
    • an array (or two arrays) of filenames that will be presented.
    • a variable called 'block'
    • here's an example of such a file
    • this .js file was created with a small perl script from a .csv spreadsheet.
    • the html header contains these two lines to get the audexp.js library and the experiment-specific list of sound files.
<script src="js/blocktest_list.js"></script>
<script src="js/blocktest_list.js"></script>

<body onload="load('id',false,500,2000);">