Psychopy Pyo Custom Audio

838 views Asked by At

I am having difficulty playing a custom audio file through Psychopy. I am getting a message saying:

AttributeError: No audio API found. Try installing pyo 0.6.8+, or pygame 1.8+

I tried to install the pyo API but still could not get it to work or install properly.

Please advise. Maybe I am installing pyo incorrectly or not loading it successfully. I am running on OSX.

Here is my code:

import psychopy

global audioLib, audioDriver, Sound, init

from psychopy import prefs
prefs.general['audioLib'] = ['pyo']
prefs.general['audioDriver']=['coreaudio']

from psychopy import sound

sound = sound.Sound('TestAudio.wav')
1

There are 1 answers

2
Jon On

Are you using PsychoPy Standalone 1.83.x? And what version of OSX? These are important.

If you are using that standalone then I think the problem is the 64bit binary of pyo that we're distributing there. I've really struggled to get it compiled in a way that it works on other versions of OSX than my own install.

If the above is the problem then the workaround for that is described on the mailing list for PsychoPy here: https://groups.google.com/forum/#!topic/psychopy-users/jMkhJKNncLM

If not the you'll need to tell us about how you install psychopy and dependencies