psychopy.org | Reference | Downloads | Github

Play and record sound simultaneously

[Python 3.7.3] [Debian 10] [Psychopy 3.1.4]

I’m wondering if it is possible to use Psychopy to record and play sounds simultaneously, in a non-blocking fashion. In my experiment, subjects hear an auditory sequence of short sinusoidal tones (beep), and they have to give synchronized responses, either manual or vocal.
Manual gives me no trouble. However, when I try to record vocal inputs with the ‘microphone’ module, it seems to clash with the ‘sound’ module.

Does anyone had a similar experience with this ?
I tried to use both ‘pyo’ or ‘sounddevice’. ‘Pyo’ is good but seems to prevent simultaneous ‘playback/record’. ‘sounddevice’ seems perfect but loading the ‘microphone’ module automatically switches to the ‘pyo’ audio library.

I’m considering using the solution suggested here, i.e., use a personal audio library, and get rid of the ‘microphone’ psychopy module. Does it sound right to you ?

Thank you very much !
Benoît