# Static component with sound

**URL:** <https://discourse.psychopy.org/t/static-component-with-sound/47322>\
**Category:** Online experiments\
**Tags:** sound, pavlovia\
**Created:** [June 15, 2026, 10:01pm UTC](https://discourse.psychopy.org/t/static-component-with-sound/47322 "2026-06-15T22:01:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![KateT](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@KateT](https://discourse.psychopy.org/u/KateT)\
**Post date:** [June 15, 2026, 10:01pm UTC](https://discourse.psychopy.org/t/static-component-with-sound/47322/1 "2026-06-15T22:01:23Z")

</div>

**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](https://discourse.psychopy.org/t/ongoing-effects-of-excessive-ai-crawlers-and-our-mitigations-on-pavlovia/47320/3) )) The link _should_ be [Pavlovia](https://pavlovia.org/katemcdonald/VD_toy_experiment)  
**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).

 ![Screenshot 2026-06-13 130105](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/4/a/4a96d4fbd4618c772e7a7ee0442bf52413d7db89.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/2/2/22e8195e3d472dedff806eaf7fca8478fe1beb72.png)

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.**

 ![Screenshot 2026-06-10 132028](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/8/f/8fa15bc76593d8650234f23fd466658e2bbebb43.png)

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 15, 2026, 10:39pm UTC](https://discourse.psychopy.org/t/static-component-with-sound/47322/2 "2026-06-15T22:39:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KateT](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@KateT](https://discourse.psychopy.org/u/KateT)\
**Post date:** [June 15, 2026, 10:41pm UTC](https://discourse.psychopy.org/t/static-component-with-sound/47322/3 "2026-06-15T22:41:19Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 15, 2026, 11:14pm UTC](https://discourse.psychopy.org/t/static-component-with-sound/47322/4 "2026-06-15T23:14:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![KateT](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@KateT](https://discourse.psychopy.org/u/KateT)\
**Post date:** [June 15, 2026, 11:23pm UTC](https://discourse.psychopy.org/t/static-component-with-sound/47322/5 "2026-06-15T23:23:54Z")

</div>

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.

 ![Screenshot 2026-06-15 205015](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/e/9/e9d9458d377239a6afee8c953b460e64d714c440.png)

 ![Screenshot 2026-06-15 205040](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/1/e/1e4b24fbba60c89ff1c956905c0a849ab988bf6c.png)

 ![Screenshot 2026-06-15 205156](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/1/9/196d0a4eed3177eee23ef1d66fac88881bd950cc.png)

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 15, 2026, 11:30pm UTC](https://discourse.psychopy.org/t/static-component-with-sound/47322/6 "2026-06-15T23:30:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![KateT](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@KateT](https://discourse.psychopy.org/u/KateT)\
**Post date:** [June 15, 2026, 11:34pm UTC](https://discourse.psychopy.org/t/static-component-with-sound/47322/7 "2026-06-15T23:34:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![KateT](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@KateT](https://discourse.psychopy.org/u/KateT)\
**Post date:** [June 16, 2026, 3:30pm UTC](https://discourse.psychopy.org/t/static-component-with-sound/47322/8 "2026-06-16T15:30:53Z")

</div>

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