-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: The sound stimulus does not play. #6943
Comments
Does the sound work normally in the virtual machine? Do you have the standalone psychopy installed as well, or only the venv version? |
Without specifying a speaker to play the sound on, it'll be using whatever psychtoolbox considers the default. Maybe the default speaker in your setup is one with no actual sound, like a virtual speaker? Try doing this:
and then specifying |
No, there is no sound in the virtual environment with the current Python version (3.10.11). |
I received the sounddevice library via pip. Then I used the following code to get a list of sound devices.
I set up the output devices I use, but it's still a problem. I'm not sure what the problem is, as I didn't set any sound devices before. |
and using the device index from there. |
Then you might also want to try adding the following at the top of the script (before importing psychology) import os
os.environ["PSYCHOPYNOPACKAGES"] = "1" It might not help, but I did encounter a case where no matter what I did, some incorrect setting seemed to be loading from the standalone psychopy (it was audio related too), I think the PTB version in my standalone install was older than the one I was using. |
PsychoPy Version
2024.2.1
What OS are your PsychoPy running on?
Windows 10
Bug Description
My python version: 3.10.11
I'm using a VENV virtual environment. I recently changed the version of python (3.9 > current) and found that my experimental code doesn't work.
Previously, my code was working fine, and the sound was outputting correctly. I have attached a video of it.
But now, when I run the same code, it does not output any error message.
The text and image stimulus presentation works fine as expected, but the sound stimulus is not outputting.
I have checked the sampling rate of the wav file, sound settings, etc. In the past, it has worked fine to display a message that an error occurred due to a sampling rate error.
However, I have no idea what the current problem is.
test.mp4
I left the code in the additional part
Expected Behaviour
The correct sound stimulus should be output.
Currently, the text and image stimuli are working properly.
Steps to Reproduce
...
Additional context
The text was updated successfully, but these errors were encountered: