This is designed for PsychoPy
versions 2020.2.10 and 2021.1.1 or newer. Other versions of PsychoPy may not be compatible.
1. Check your PsychoPy study for name clashes
Make sure that your study does not have anything named
HeadphonesCheck or similar. This includes any component names and variables.
Any clashes are likely to result in unrecoverable errors and loss of data.
This guide adds code to import the
HeadphonesCheck class, create an instance of the class called
and add a function called
handleHeadphonesCheckResult to handle the result of the check. If you choose to save the results, the results are saved in a column called
HeadphonesCheckResults in JSON format.
Please ensure that you do not use any of these names in your study.
2. Export HTML from PsychoPy
Open your study in the
PsychoPy Builder, then go to
name of your study.js
The file ending in
-legacy-browsers.js that PsychoPy creates at the same time is not compatible with this automated guide.
If you wish to use the Headphones Check with this file specifically, refer to
the documentation on GitHub to manually add it to your
You can still continue to use this guide for the non-legacy file.
3. Upload your
name of your study.js to add the Headphones Check code
Open the folder where your PsychoPy study is saved, and Drag and Drop your
name of your study.js file into the box below.
Alternatively, open your file, copy the entirety of its contents, click Paste contents and paste it into the text box that appears.
4. Customize your Headphones Check
5. Choose what happens if the Headphones Check is failed
Review and download your new Headphones Check.
7. Replace your original
name of your study.js file with the new file
Make sure that the file names are identical when replacing the original file.