If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): Win 11 PsychoPy version (e.g. 1.84.x): v2021.2.3 What are you trying to achieve?:
I have an experiment with an audio stimulus. When the preferences are set in the following order: [sounddevice, PTB, pyo, pygame] the experiment runs but this message appears:
We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
When I change the preferences order to the recommended one the experiment does not run at all. What should I do?
Thank you for your reply. Yes, I need sound. I have an auditory stimulus. The audio files are wav and the intensity is the same to all of them set to 75dB. The problem is that the auditory stimulus works only when the preferred audio engine is sounddevice and when I put PTB as a preferred audio engine the experiment does not run at all.
The sounds works when it is set to sounddevice. But when I set PTB as preferable it does not run at all. I tried it again and the error message was this one:
Hello from the pygame community. Contribute - pygame wiki
PTB-ERROR: Failed to open audio device -1. PortAudio reports this error: Invalid device
PTB-ERROR: Desired audio parameters likely unsupported by audio device.
PTB-ERROR: This could be, e.g., due to an unsupported combination of audio sample rate, audio channel count/allocation, or audio sample format.
Error in function Open: Usage error
Failed to open PortAudio audio device due to unsupported combination of audio parameters.
I tried to run the experiment as it was (with PTB as a preference) online, and it worked. It still does not run locally. But since I need my experiment to run online I guess that this is not a problem, right?
well, I don’t know. I never had problems with sound.
Do you have toy-version of your experiment, one with just the relevant routine and only two or three offending stimuli? You could upload this here and one could check it out.
Thank you. I do not have a toy-version. But I only have a couple of introductory pages and two example sessions. The first is just a demonstration of what the experiment looks like and the second one is identical to the actual experiment, with the only difference that it provides feedback. Both examples use sound, they are very similar to the actual experiment.
I have set PTB on the top of the preferences list, and the experiment does not run locally at all, but when I pilot it on pavlovia it works fine. Important here is that I need the experiment to run online.
If anyone could take a look at it, I would be grateful! exp01222.psyexp (42.4 KB)
the idea is make a toy-experiment (so deleted all routines welcome_page to details, and questions-routine), save this (and the relevant stimuli and excel-file) in a new folder and upload this Anyway without stimuli and your excel-file, I can’t run the experiment.
well, I am sorry but your toy-experiment runs without any problems with all various sound-libraries on my computer. So, I am afraid that I can help you.
I have often had sound issues working locally which resolve themselves when moving online. However, I use .mp3 versions for moving online; maybe this will help?