A word about pyo (audio backend)

Hi Olivier,

I’m relatively new to PsychoPy and python coding, and have limited experience with audio backend. I was wondering if you had an advice on this issue? I’m randomly getting an error message stating “portmidi closed”. It’s described in more detail here:

I copied the code for the voice key component from the word_naming demo. The code called for the voice key at the beginning of the experiment is:

# The import and pyo_init should always come early on:
import psychopy.voicekey as vk
vk.pyo_init(rate=44100, buffersize=32)

# What signaler class to use? Here just the demo signaler:
from psychopy.voicekey.demo_vks import DemoVoiceKeySignal as Signaler

# To use a LabJack as a signaling device:
#from voicekey.signal.labjack_vks import LabJackU3VoiceKeySignal as Signaler

My settings look like this:

Any assistance or advice would be greatly appreciated as this problem is leading to much frustration and data loss.

Thank you!

~Mara