OS (e.g. Win10): macOS 10.15.3 PsychoPy version (e.g. 1.84.x): v2020.2.5 Standard Standalone? (y/n) If not then what?: y What are you trying to achieve?:
Hello! I’m a beginner to PsychoPy working on an experiment in which the participant should hear one of 8 audio files and then answer a series of questions specific to that audio file. Currently, when I run the experiment, around 10-15 seconds of the audio file will play and then it will quit the experiment with no error message.
My current routine and conditions file is included below -
each prompt file contains 12 questions with the participant given the option of clicking the left arrow for true and right arrow for false. Let me know if I need to elaborate on anything. Thank you!
Your flow and conditions file all look simple and correct to me there. Some things to try:
Does it do the same for other audiofiles.
is there a specific time it cuts out? (add a timer to your experiment by adding a text component to your ‘Audio’ routine and in the ‘text’ field use $AudioClock.getTime() and ‘set every frame’
Are you able to please sync the project with pavlovia and then share the URL to the project with us (this will allow us to look at your files).
After syncing/creating a project on pavlovia, you would need to navigate as follows to give us access:
Dashboard>Experiment>Select Experiment you want> View Code <> Settings (left hand tool bar, image of cog) > Permissions > Public
I apologize for all the files present! I populated them all by mistake but the relevant ones for the memory bias experiment are in the “memory bias” folder. Let me know if this helps at all!
Hi Emily,
Thanks for sharing this, to help me navigate the problem please could you let me know which .psyexp file you are primarily working from at the moment?
Becca
Currently it sounds as though the audio plays fully through here, but I did get the error ’ * ReferenceError: Questions is not defined’ Is this the point at which you were at as well?
Thank you for taking a look! When I run it on my computer, it has now started quitting before the audio even plays. But, when I run it on pavlovia, the audio plays but the questions fail to appear after.
I haven’t gotten that error message, presumably because my experiment doesn’t get to that point. My goal for the experiment is to have the participant receive one audio and one set of questions (named prompt + “the corresponding audio number” in the folder). I have tried to do this by leading Psychopy to the file paths of the questions and the corresponding audio file in the “promptorder.xlsx” file. The questions variables are then defined in the seperated prompt files. Is there any different way of organizing the files to get the desired effect that you would recommend? Let me know if you need me to describe anything further and thank you so much again!
I think Ive been working from the right file here, but at the moment it is a bit tricky to debug because it seems you might need to adjust the sampling rates of your audio files.
The project I have been working from is here https://gitlab.pavlovia.org/lpxrh6/memorybias_debug
The error I ran into above is because there is actually a psyexp file outside of the MemoryBias folder with an identical name - and it seems that is the file your pavlovia project is actually using.
I can’t currently run this locally as I get the error outlined here Audio file loop is not working so you may need to edit your sound files (it is possible that may resolve your original issue)
After reviewing the doc I changed the audio file formats to .mp3 and took out the sound duration in the property window. I also checked to make sure the audio files are all cut to the proper length. Although, when I run the experiment in Pavlovia I still have the same issue of the experiment not continuing after the audio loops once. If it’s not pulling the proper questions because it can’t locate the $questions variable in my folders do you have any suggestions on how to lead it to that path? Thank you so much!
First I had a difficulty running the task locally, I think it was that python on windows couldn’t play these sound files because they were compressed for some reason (so I converted them all to wav, again, sorry, using audacity) - this got the task running locally for me.
Following this I was at the same point you describe, the sounds cut short. This seems to be a bug and I will log it on the github. For now, a work around is instead to use a code component to present the sound (see ‘code’ in your ‘Audio’ routine). This is currently set to be codetype ‘both’ because I needed to change some JS code to get this working online. In short, the python code is:
Thank you! When I run the experiment through Pavlovia I’m able to hear the whole Audio but my issue is that it won’t go onto the next questions section because it says $questions is not defined. If it’s not pulling the proper questions because it can’t locate the $questions variable in my documents do you have any suggestions on how to lead it to that path? Thank you so much!
Aha I should have mentioned, the debugged version should have that corrected too (I think the initial ‘Prompt’ column was looking for xlxs rather than xlsx files - so I corrected that typo and now it should get the questions no problem)
Let us know if the URL above works close to what you expect
Thank you so much for catching that! Unfortunately I still get the “Question not defined” message when I run the experiment even with the corrected file endings.
To try to get it to work I tried replacing conditions section on then Trials Loop with the a couple different things:
$Prompt (the one included in your link)
$Prompt + “.xlsx”
$PromptOrder.xlsx
unfortunately all of these led to the same error message. Let me know if you have any ideas and thank you again for all your help!