If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): macOS Catalina, version 10.15.7
PsychoPy version (e.g. 1.84.x): 2020.2.4
Hi everyone! I am new to PsychoPy but really struggle with making it work.
I wish to make an experiment in which the participants will have to identify voices. The participants will first have to go through a “training phase”, in which they will be presented with 8 audio files of different people speaking one at a time. Each audiofile is 30s long and placed in a subfolder called “stimuli” in the same directory as my experiment. The audiofiles are .wav format. I have made an excel sheet in which the top of the column says “Trainfile”, and each cell below this includes a unique path to the audiofiles I wish to include in the loop (an example is the following: stimuli/audiotrain1female.wav).
What are you trying to achieve?:
What I am struggling with is how to include these audiofiles in a loop (in a random order). After one audioclip has played, there should be a text saying “Press any key to hear the next voice”. The participant should then press a key and the next audiofile should start playing. This is the structure that I have made so far.
What did you try to make it work?:
I tried to add the excel file in the trainloop. Don’t know if I did something wrong?
What specifically went wrong when you tried that?:
I get this error message:
Running: /Users/emma/OneDrive - Aarhus Universitet/1. Semester/CogCom/CogCom Exam/Demo/builderdemo_lastrun.py
2.0851 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
2020-12-04 07:12:17.790 python[96835:1530843] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
Traceback (most recent call last):
File “/Users/emma/OneDrive - Aarhus Universitet/1. Semester/CogCom/CogCom Exam/Demo/builderdemo_lastrun.py”, line 277, in
sound_1.setSound(‘Trainfile’, hamming=False)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/sound/backend_sounddevice.py”, line 361, in setSound
_SoundBase.setSound(self, value, secs, octave, hamming, log)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/sound/_base.py”, line 193, in setSound
raise ValueError(msg + value)
ValueError: setSound: could not find a sound file named Trainfile