Not able to make Psychopy select and play the sound files

I’m new to psychopy. I’m trying to do a Familiarity test in which participants will complete a talker identification task. Each trial will present the same word produced by six different female talkers (three with L1 accent, three with L2 accent) in random order. One of the talkers will be the L2 training talker. Participants will be instructed to identify the position of the training talker by clicking on an onscreen button (each button showing a value between 1 and 6). Preformatted text

My problem is that I’m not able to make Psychopy select and play the sound files.
The data is stored in a csv file, containing columns for the name of the word, six columns for each of the talkers producing the word with rows containing each word for the word column, and the filename for the 6 talkers producing that word.
The csv looks like this:
Word, Spaniard1_filename, Spaniard2_filename, Spaniard3_filename, American1_filename, American2_filename, American3_filename
bailar,Spaniard1_bailar.wav,Spaniard2_bailar.wav,Spaniard3_bailar.wav,American1_bailar.wav,American2_bailar.wav,American3_bailar.wav

The sound files are stored in a folder called “Sound_Files” and divided into L1 (“Spaniards”) and L2 (“Americans”) folders.

OS : Win10
PsychoPy version (e.g. 1.84.x): 2022.2.5

Familiarity_task.psyexp (145.3 KB)
Word_List.xlsx (26.2 KB)

Hi There,

It looks like the sound components in your “trial_sound” routine are using the column “Word” to try and find the sound file, but the column “Word” does not correspond to a filename. Instead of using $Word in the sound field of your sound components, use the column headernames that correspond to wav files e.g. $Spaniard2_filename

Hope this helps,
Becca

I’ve tried that too and it still doesn’t work, but many thanks! :pray:

Hello Marian

why do you a code-component in trial_sound to read in your stimuli? You don’t need that when you use condition-file to read the stimuli. There is also an error in trial_sound_2 where you specify a condition-file as stimulus but you can only use a variable or constant as a parameter. Given that you read quite many sound files, you might want to read in the sound-files during the ISI-period.

Best wishes Jens

Hi! Thanks a lot! How can I do the sound file reading during the ISI period?

Hello Marian

This is a toy routine that illustrates the approach.

Here you set that the sound is loaded during the ISI-period.

The ISI-period should be long enough to ensure that the sound-file is loaded.

Best wishes Jens

thanks a lot!