Audio Stream -Unable to Add Multiple Audios in Response to Excel File

Hello,

My PsychoPy project heavily involves playing audio streams. Using the “audio” component, I was able to only play one specific audio that is part of a trisyllabic word (e.g; TU.wav). However, my goal is to play and sync all the audios with an excel file -containing all the arrangements of the word syllables individually (e.g; TUPIRO, etc).

I attempted in creating separate audio components for each syllable. However, I believe this is incorrect as the flow will be independent from the excel file. The data shows were only in response to the participants rating response, but does not tally with the audio played during the trial.

Would appreciate anyone’s help. Thank you!

Hi @Afrina, if you have 3 syllables to play on each trial, you will want to have three audio components that play consecutively, then in your conditions file you can have three columns holding your syllable .wavs , each column corresponding to a particular audio component, e.g., 1st, 2nd and 3rd.

Thank you very much for your help!

Hello again,

I have made progress and was able to synchronise the audios with the excel file (refer below) with the CV1, CV2 and CV3.

However, another problem arises -after one trial plays successfully, the following trials have no sound but the rating responses and the excel output is correct (seems as though the program is running well but the sound files are having problems).

This is the error message we got as follows;

Traceback (most recent call last):
File “sounddevice.pyc”, line 733, in callback_ptr
File “sounddevice.pyc”, line 2508, in _wrap_callback
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/sound/backend_sounddevice.py”, line 206, in callback
self.sounds.remove(thisSound)
ValueError: list.remove(x): x not in list

Thank you!

That’s a known problem that will be fixed in version 3.0.0b12. Here’s a workaround:

  1. Open /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/sound/backend_sounddevice.py with administrator rights
  2. Go to line 206 (or search for self.sounds.remove(thisSound))
  3. Remove .sounds so that it reads self.remove(thisSound)
  4. Save the file
  5. Restart PsychoPy.

Edit: You’re lucky: PsychoPy 3.0.0b12 was just released, so you can just install the update instead of following the steps above. I’ll leave them there in case you want to stay with Beta 11, though.

1 Like

Hi TorgeMS,

It worked! Thank you very much.

How do you solve it?

I can not locate self.sound.remove, how?