Replies: 1 comment 1 reply
-
By using the addProperties function in the on_finish function, you are adding the audio response to every trial in your experiment. I would avoid this because in contrast to deleting data you are now actually adding more data to your experiment. (Not sure if the assignment happens by reference or creates a copy, but better safe than sorry :)) Can you check if it works without using the on_finish function? I have managed to do so in the past and it worked like a charm on cognition.run. You do need a little code to convert the actual audio from the JSON response afterwards. Let me know if you need help with that. To delete the audio response from the jsPsych object is probably a little bit more tricky. Normally you would have custom code in the on_finish() that sends data to the server and then deletes the data from the jsPsych object. However, I think cognition.run saves the data automatically after the on_finish function is executed, which means your next chance to delete the data would be at the start of the subsequent trial (e.g., in the on_load() function). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
When using the html-audio-response plugin on cognition.run, it can cause crashes or slow performance. The plugin documentation suggests saving the data to your server immediately after the trial and deleting the data from jsPsych's data object. However, since cognition.run manages the server-side, I am unclear how to achieve this on cognition.run
Here is a code snippet where the plugin is being used:
Any assistance with saving the recorded data and deleting it from the jsPsych data object when using cognition.run would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions