psychopy.org | Reference | Downloads | Github

Problem reading my .wav files

Win10
PsychoPy version 1.90.1

Hi guys,

I keep getting this message when I tell psychopy to read .wav stimuli from an excell file.

  File "C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\sounddevice.py", line 733, in callback_ptr
    return _wrap_callback(callback, data, frames, time, status)
  File "C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\sounddevice.py", line 2508, in _wrap_callback
    callback(*args)
  File "C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\psychopy\sound\backend_sounddevice.py", line 194, in callback
    toSpk[:len(dat), :] += dat  # add to out stream
ValueError: non-broadcastable output operand with shape (128,1) doesn't match the broadcast shape (128,2)

Blockquote

But here is what is interesting:
When I specify the exact file which should be played, by typing a relative path to the ‘‘audio’’ field, psychopy reads it just fine.

Anyone might have a clue about what is going on?
Thanks in advance

Not without you showing us exactly what you did.

Hi
What i’ve done recently after struggling with the audio bugs is simply import soundfile and sounddevice and then doing something like:

s = sf.open(‘file.wav’)
.
.
.
sd.play(a)
.
.
.
sd.stop()

Did you manage a fix yet? I have pretty much the same problem…