# "psychopy.exceptions.SoundFormatError"?

**URL:** <https://discourse.psychopy.org/t/psychopy-exceptions-soundformaterror/24486>\
**Category:** Builder\
**Tags:** sound\
**Created:** [August 10, 2021, 4:39pm UTC](https://discourse.psychopy.org/t/psychopy-exceptions-soundformaterror/24486 "2021-08-10T16:39:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yasmine\_Tachakourt](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/yasmine_tachakourt/32/14734_2.png) [@Yasmine\_Tachakourt](https://discourse.psychopy.org/u/Yasmine_Tachakourt)\
**Post date:** [August 10, 2021, 4:39pm UTC](https://discourse.psychopy.org/t/psychopy-exceptions-soundformaterror/24486/1 "2021-08-10T16:39:26Z")

</div>

Hello everyone! Could you please help?

For the test phase of my experiment, participants are shown two objects on the screen whilst hearing a word. They then have to match the correct object to the word they’ve heard. When running the test phase of the experiment I get this error, which I assume has to do with the sampling frequency of sound files in the conditions file. Could you please explain the error in the message and how to fix it using the builder? For reference, I am using Psychopy3 (version 1.85.3b-win32) on windows 10.  
I highly appreciate your help.

**ERROR:**

Hello from the pygame community. [Contribute - pygame wiki](https://www.pygame.org/contribute.html)  
8.2087 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).  
Traceback (most recent call last):  
File “C:\Users\Yasmine\Desktop\CSSL\admin\_test\_lastrun.py”, line 125, in   
sound\_1.setSound(words, hamming=True)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend\_sounddevice.py”, line 373, in setSound  
raise err  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend\_sounddevice.py”, line 365, in setSound  
blockSize=self.blockSize)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend\_sounddevice.py”, line 96, in getStream  
blockSize=blockSize)  
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend\_sounddevice.py”, line 135, in \_getStream  
.format(label, list(self.keys())[0], sys.platform)  
psychopy.exceptions.SoundFormatError: Tried to create audio stream 22050\_2\_128 but 44100\_2\_128 already exists and win32 doesn’t support multiple portaudio streams

##### Experiment ended.

---

<div class="post-metadata">

**Author:** ![JensBoelte](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jensboelte/32/9060_2.png) [@JensBoelte](https://discourse.psychopy.org/u/JensBoelte)\
**Post date:** [August 11, 2021, 10:58am UTC](https://discourse.psychopy.org/t/psychopy-exceptions-soundformaterror/24486/2 "2021-08-11T10:58:40Z")

</div>

Hello,

the sound you play must be of the same sampling frequency as any other application that uses the sound system. See [here](https://psychopy.org/api/sound/playback.html). Either use a different sound engine that supports your sampling frequency or change the sampling such that it fits.

Best wishes Jens

---

<div class="post-metadata">

**Author:** ![Yasmine\_Tachakourt](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/yasmine_tachakourt/32/14734_2.png) [@Yasmine\_Tachakourt](https://discourse.psychopy.org/u/Yasmine_Tachakourt)\
**Post date:** [August 11, 2021, 3:01pm UTC](https://discourse.psychopy.org/t/psychopy-exceptions-soundformaterror/24486/3 "2021-08-11T15:01:46Z")

</div>

Thank you Jens. This was helpful.
