| Reference | Downloads | Github

Failed to open PortAudio audio device

Hello everyone,

I’ve tried to play a sound using examples found on the documentation like this:

import psychtoolbox as ptb
from psychopy import core, prefs
prefs.hardware[‘audioLib’] = [‘ptb’,‘pyo’]
from psychopy import sound

mySound = sound.Sound(‘C:\Users\Alex\bang.wav’)
now = ptb.GetSecs()

But I’m getting an error:

Exception: Failed to open PortAudio audio device due to unsupported combination of audio parameters.

I can use pyo or sounddevice to successfully play the sound, but it says that ptb should be used for speed. Does anyone have a solution for this?

1 Like

I am having the same issue when I try to use an external audio device. Did you find any solutions to this?