I’m currently working at a microphone-testrun before the experiment starts.
I have just a poor knowledge about coding, so I don’t know how to adapt the code for my experiment.
I found this piece of Code, which must hold the answer for my problem:
Is there a reason that you are using coder for this? There is a nice demo of this in Builder view (although it might not currently work on mac). You can find it under demos > word_naming
I made it, to include this into my experiment.
But now I’m facing another strange error.
Sometimes, not every time, the experiment suddenly stops with saying:
11.2001 WARNING Starting Microphone but sound lib preference is set to be [‘PTB, pyo’]. Clashes might occur since ‘pyo’ is not preferred lib but is needed for Microphone
Pyo warning: Portmidi closed.
I tried a lot of different settings but I really don’t understand, what’s the problem.
When I change the prefences the Warnings differ, but the result is the same.
This is a warning rather than an error (i.e. it shouldn’t stop your experiment running) - it is basically saying pyo is the required sound library but PTB is the default ( probably because this is the most accurate for sound presentation timing ). In file > preferences> hardware> audio library, the order of those indicates which sound libraries are given precedence. In your case, PTB is positioned before pyo, switching the position should remove the error - but remind future you that you switched the setting!
I already tried to play around with various preferences. I also did, what u advised. But the result is the same. Psychopy shuts down but without a serious error-message.
I will see, if the online-version has the same issues.
Hi There this will not work online I am afraid since the microphone component does not exist yet in psychoJS - see here a list of what currently is and is not supported online Status of online options — PsychoPy v2021.1