psychopy.org | Reference | Downloads | Github

Using microphone as a response option

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Mac OS 10.14.6
PsychoPy version (e.g. 1.84.x): 3.2.4
Standard Standalone? (y/n) If not then what?: Standard Standalone
What are you trying to achieve?: I’m building a study with a visual stimulus, and I’d like to record RT of the verbal responses.

What did you try to make it work?: I selected the microphone under the “Response” category.

What specifically went wrong when you tried that?: When I tried to run the script, I received the following error message. It’s my first time using this feature. Any help will be much appreciated. (As an aside, the script runs fine if I delete the microphone component as a response option.)

2020-02-13 20:49:02.046 python[79936:4600674] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
Traceback (most recent call last):
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/sound/backend_pyo.py”, line 19, in
import pyo
File “pyo/init.pyc”, line 28, in
File “pyo/lib/analysis.pyc”, line 32, in
File “pyo/lib/_core.pyc”, line 58, in
File “pyo/_pyo.pyc”, line 14, in
File “pyo/_pyo.pyc”, line 10, in __load
File “imp.pyc”, line 342, in load_dynamic
ImportError: dlopen(/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/lib-dynload/pyo/_pyo.so, 2): Library not loaded: @loader_path/libportaudio.2.dylib
Referenced from: /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/lib-dynload/pyo/_pyo.so
Reason: image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “//Desktop/fNIRS_Stroop/test_microphone_lastrun.py”, line 18, in
from psychopy import sound, gui, visual, core, data, event, logging, clock, microphone
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/microphone.py”, line 45, in
from psychopy.sound import backend_pyo
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/sound/backend_pyo.py”, line 23, in
raise exceptions.DependencyError(repr(err))
psychopy.exceptions.DependencyError: ImportError(‘dlopen(/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/lib-dynload/pyo/_pyo.so, 2): Library not loaded: @loader_path/libportaudio.2.dylib\n Referenced from: /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/lib-dynload/pyo/_pyo.so\n Reason: image not found’,)