(PTB) audio not working

Standalone PsychoPy 2021.2.3

Primarily trying to get code that worked before on the same version (reinstalled and code from backups) to work again. We have identical systems running the same code that work fine.

it keeps complaining about not being able to find a file type.wav. everything is as it was. The excel file to run the task has all the paths to the audio files. There is no file called “type.wav” (in case it is searching for a a file called type.wav instead of a file type *.wav.

Failed to load audio: setSound: could not find a sound file named type.wav

As i ran out of ideas I did a re-install but even with this fresh install there still seem to be information that is kept, as it still loaded up with old scripts and some file paths. Anyone know where stragglers are hidden as I want to get everything out and really start fresh.?

In the mean time starting from zero :
I am just making sure I can play a sound at all.

After that I’m trying to get PTB to work
Also trying to get an M-audio M-track solo to work because i want stable latency.

step 1

try if it want to beep at all:

from psychopy import prefs
prefs.hardware[‘audioLib’] = [‘pyo’]
from psychopy import sound

AMP = 0.5
audio_path = r’pathto/beep.wav’

acoustic_stim = sound.Sound(audio_path)

*and this works: :slight_smile: *
*however if i set :prefs.hardware[‘audioLib’] = [‘PTB’] *
# with these settings


When I use the M-audio SOLO box it does show up in the pull-down (speakers M-audio duo and solo), it is set in the windows env as well. No errors when i run it, just no sound.

any ideas welcome!

____some extra system info
Paths to files on the system:
userPrefsFile: C:\Users\jriph\AppData\Roaming\psychopy3\userPrefs.cfg
appDataFile: C:\Users\jriph\AppData\Roaming\psychopy3\appData.cfg
demos: C:\Program Files\PsychoPy\lib\site-packages\psychopy\demos
appFile: C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\PsychoPy.py

System Info:
Operating System: Windows-10-10.0.19041-SP0
Processor: Intel64 Family 6 Model 165 Stepping 2, GenuineIntel
CPU freq (MHz): 2304.0
CPU cores: 8 (physical), 16 (logical)
Installed memory: 33973977088 (Total), 20389040128 (Available)

Python info:
Executable path: C:\Program Files\PsychoPy\pythonw.exe
Version: 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)]
(Selected) Installed Packages:
numpy (1.18.1)
scipy (1.4.1)
matplotlib (3.3.0)
pyglet (1.4.11)
PyGLFW (1.7.0)
pyo 0.9.7
psychtoolbox (
wxPython (4.1.1)

OpenGL Info:
Vendor: Intel
Rendering engine: Intel(R) UHD Graphics
OpenGL version: 4.6.0 - Build
Shaders supported: True
(Selected) Extensions:
GL_ARB_multitexture: True
GL_EXT_framebuffer_object: True
GL_ARB_fragment_program: True
GL_ARB_shader_objects: True
GL_ARB_vertex_shader: True
GL_ARB_texture_non_power_of_two: True
GL_ARB_texture_float: True
max vertices in vertex array: 1048576

It will play if I set it like this:Your prefs are currently set to use [‘pyo’, ‘PTB’, ‘sounddevice’, ‘pygame’] (in that order).

But I reckon it will be using pyo not PTB even though it is can be set using prefs.general[‘audioLib’] = [‘PTB’] ?