Static component with sound

OS (e.g. Win10): Win10
PsychoPy version (e.g. 2024.2.4 Py 3.8): 2024.2.4 Py 3.10.11
Standard Standalone Installation? (y/n) yes
URL of experiment: I tried to make it public, but it gave me a warning about avatar size. There was no avatar, so I tried to add one. Everything I try seems to give the same warnings about avatar when I try to make it public–it is too big (even when it is smaller than the indicated size) or that it is an invalid image format–I tried png and jpg even though I don’t really want an avatar, I’m just trying to make it a shareable link. (This has persisted since the post by Jon ( Ongoing effects of excessive AI crawlers, and our mitigations, on Pavlovia - #3 by jon )) The link should be Pavlovia
Do you want it to also run locally? (y/n) no (although it does seem to work locally, the audio quality is terrible locally and I haven’t done anything to try to fix that because I’m not trying to run it locally)
What are you trying to achieve?

I am trying to set sound to load during a static component ISI. When I change the sound component to set during: soundcheck.ISI, I get an error message the argument should be an instance of the Sound class and the experiment is aborted. When I leave it to set every repeat, it seems to work okay (except that some of my pilot participants have been having audio quality issues, which is why I was trying to make the static component strategy work).

In my full experiment, I use .ogg files and .csv files for stimuli selection, and also have keyboard responses being measured while the participant is listening to the stimuli, but I got the exact same error message from this much simplified version, so I am working with this for now.

What specifically went wrong when you tried that?:
I get the error message:

Unfortunately we encountered the following error:

  • when setting the sound
  • the argument should be an instance of the Sound class.

I suspect that set during ISI only works for audio files, not notes.

My experience is that the notes have a harsh sound online, and it would be better to find a suitable audio file.

I had it using an ogg audio files, I just left it as the note here because it seemed simpler and it gave me the same error message (I was trying to simplify as much as possible to isolate the problem).

.ogg audio files don’t work online. You can use .wav or .mp3 (the latter doesn’t work locally)

Oh, that’s odd. I switched from .wav to .ogg in an experiment last summer because the ogg files are smaller, and I ran an experiment with .ogg audio files successfully last month. I just tried again with a .wav file and got the same error again. I’ll try an .mp3 now in case that makes a difference.

I’ve just spotted that you’re using an old version. I think setting sound files in ISI static periods online was fixed in 2025.1.0

Ah, thank-you! I will try updating to a newer version of PsychoPy

I updated to 2026.1.3 and the error has resolved. Thanks for the help wakecarter!