psychopy.org | Reference | Downloads | Github

"psychopy.exceptions.SoundFormatError"?

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

Hello,

the sound you play must be of the same sampling frequency as any other application that uses the sound system. See here. Either use a different sound engine that supports your sampling frequency or change the sampling such that it fits.

Best wishes Jens

2 Likes

Thank you Jens. This was helpful.