# Problem reading my .wav files

**URL:** <https://discourse.psychopy.org/t/problem-reading-my-wav-files/4538>\
**Category:** Builder\
**Tags:** randomization, sound\
**Created:** [May 19, 2018, 4:17am UTC](https://discourse.psychopy.org/t/problem-reading-my-wav-files/4538 "2018-05-19T04:17:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pasoneto](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@pasoneto](https://discourse.psychopy.org/u/pasoneto)\
**Post date:** [May 19, 2018, 4:17am UTC](https://discourse.psychopy.org/t/problem-reading-my-wav-files/4538/1 "2018-05-19T04:17:48Z")

</div>

**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.

> ```auto
> 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

---

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/michael/32/16_2.png) [@Michael](https://discourse.psychopy.org/u/Michael)\
**Post date:** [May 19, 2018, 11:11am UTC](https://discourse.psychopy.org/t/problem-reading-my-wav-files/4538/2 "2018-05-19T11:11:39Z")

</div>

> [@pasoneto](#):
>
> Anyone might have a clue about what is going on?

Not without you showing us exactly what you did.

---

<div class="post-metadata">

**Author:** ![Eitan\_Hemed](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/eitan_hemed/32/4171_2.png) [@Eitan\_Hemed](https://discourse.psychopy.org/u/Eitan_Hemed)\
**Post date:** [May 20, 2018, 9:24am UTC](https://discourse.psychopy.org/t/problem-reading-my-wav-files/4538/3 "2018-05-20T09:24:45Z")

</div>

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()

---

<div class="post-metadata">

**Author:** ![publu](https://avatars.discourse-cdn.com/v4/letter/p/b4bc9f/32.png) [@publu](https://discourse.psychopy.org/u/publu)\
**Post date:** [June 1, 2018, 7:57am UTC](https://discourse.psychopy.org/t/problem-reading-my-wav-files/4538/4 "2018-06-01T07:57:43Z")

</div>

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