How to record a speech in psychopy? My microphone does not work

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

OS (e.g. Win10): iOS system
PsychoPy version (e.g. 1.84.x): Psychopy 3
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:

I want to record sounds as input

What did you try to make it work?: I’ve tried to insert the microphone in a routine ( a screen asking the participant to describe a image)

What specifically went wrong when you tried that?:
I get the following error:

Generating PsychoPy script…

Running: /Users/nataliaresende/Desktop/Experimento2_1/MTrill_2_lastrun.py

2019-10-24 11:16:58.910 python[518:5881] 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 “/Users/nataliaresende/Desktop/Experimento2_1/MTrill_2_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’,)

Include pasted full error message if possible. “That didn’t work” is not enough information.

1 Like

@natcarol2000
Hi,
I have been getting the same error message on my mac when trying to use my microphone component. Did you figure out a solution?

Thanks,
Hannah

I’m having the same problem, found in several different posts: