Hi everyone,
I’m new to PsychoPy so please excuse me if this is a easy problem to solve. I’m trying to build a very simple experiment on macOS.The task is straightforward: participants press the space bar, a second routine starts, and after a variable delay (200, 400, or 600 ms) a beep sound should play. However, any time I include a Sound component, the experiment crashes before it starts with the following error:
psychopy.hardware.exceptions.DeviceNotConnectedError:
No speaker device found with index 'None
Some info:
-
PsychoPy: 2026.1.3
-
macOS
-
Audio backend: PTB (Psychtoolbox)
Things I’ve already tried:
-
Verified that the sound file exists and can be played outside PsychoPy.
-
Tried different audio backends:
-
PTB
-
pygame
-
pysound
pygame failed because
pygameis not installed.
pysound failed becausepysoundcardis not installed. -
-
Removed and recreated the Sound component multiple times.
-
Left the Device field as
Default. -
Created custom speaker devices in Builder and assigned them to the Sound component.
-
Manually edited the generated Python script to change the speaker settings.
-
Tested a minimal experiment containing only:
-
a text component
-
a sound component
The same error occurs.
-
I also try to check if the speaker is at all detectable. When I run:
from psychopy.hardware.speaker import SpeakerDevice
devices = SpeakerDevice.getAvailableDevices()
for d in devices:
print(d)
I get:
{'deviceName': 'MacBook Air Speakers', 'index': 2.0, 'name': 'MacBook Air Speakers'}
{'deviceName': 'Microsoft Teams Audio', 'index': 3.0, 'name': 'Microsoft Teams Audio'}
So PsychoPy/PTB can detect my speakers.
Has anyone encountered this on recent PsychoPy versions? Any suggestions would be greatly appreciated.