# Problems with audio-files

**URL:** <https://discourse.psychopy.org/t/problems-with-audio-files/13932>\
**Category:** Builder\
**Tags:** sound\
**Created:** [June 3, 2020, 4:32pm UTC](https://discourse.psychopy.org/t/problems-with-audio-files/13932 "2020-06-03T16:32:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RV\_92](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@RV\_92](https://discourse.psychopy.org/u/RV_92)\
**Post date:** [June 3, 2020, 4:32pm UTC](https://discourse.psychopy.org/t/problems-with-audio-files/13932/1 "2020-06-03T16:32:39Z")

</div>

If this template helps then use it. If not then just delete and start from scratch.

**OS** (e.g. Win10): Win10 (HP)  
**PsychoPy version** : v.2020.1.3  
**Standard Standalone? (yes)**  
\*\*What are you trying to achieve?: I am trying to play different audio-files per loop. This worked at first, but then in the second trial the audio-files are not played entirely but cut or entirely skipped. Thereafter I got a second problem where with some settings the audio (but still not the entire one) can only be played on my headphones and not on my speakers.

**What did you try to make it work?:** I tried various - less and more complex - designs (as it was first working and now not anymore), I tried changes preference audio-settings and I tried adding ISI’s. My audio-files differ in length (6, 8, 9 seconds).

**What specifically went wrong when you tried that?:**  
Dear reader, in my design I would like to play different audio-files per trial, which at first worked. However I changed my design and now I bump into problems that I cannot get right (and also the previous designs do not work anymore):

1. The first audio-file is played correctly, but the ones after that are either cut half-way or skipped entirely. Adding an ISI to load the sound-files did not work.

2. Next I tried changing the preference settings, which also didn’t work:  
a. With ‘sounddevice’ as preference setting, I have the problem described under 1 when having headphones in, and the following problem without headphones:  
ValueError: Multiple output devices found for ‘Speakers (Conexant ISST Audio)’:  
[3] Speakers (Conexant ISST Audio), MME  
[7] Speakers (Conexant ISST Audio), Windows DirectSound  
[8] Speakers (Conexant ISST Audio), Windows WASAPI

b. With ‘PTB’ as preference, I get the error that the audio-files are not with the same Hz, however I had this before and changed all the audio-files (and checked again) to 44100. So I am not sure how this can be the case.  
psychopy.exceptions.SoundFormatError: Tried to create audio stream 44100\_2\_128 but 48000\_2\_128 already exists and win32 doesn’t support multiple portaudio streams

c. With ‘pygame’ the experiment just stays grey after the first audio-file (with and without tapping the ‘’hamming’’ box).  
I paste my Flow and Excel-file underneath. I really hope someone can help me, thank you in advance. R.

Flow  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/3/c/3cf60789767587e78f14e1a8b845c85793a510c2.png)  
Excel-file  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/4/0/40b1c84dbb1efb2734f1d5f2980b5d90e8d6c5c1.png)
