Set trial durations to be consistent with audio file length in each Condition

I am building in Psychopy for the first time, attempting to create a temporal bisection experiment in which participants will hear sine waves of different lengths and respond with ‘s’ or ‘l’ if they perceive it as shorter of longer than a reference anchor they learn at the start. I manually added 2 seconds of silence to each audio track (for each sine wave duration) in audacity because I would like each participant to have 2 seconds following each stimulus to respond. I would like the trial to automatically move on to the next stimulus after the audio track ends (which includes the 2 secs of silence for response). If I set my key response to force end of routine then it will advance to the next trial only after key response, and if I uncheck that box, then the trial never ends or moves on.
I currently have the duration box blank on both the audio and key response components because the length should change for each condition. Can I enter my desired length in my conditions file next to each condition (i.e.: create a column that specifies how long each audio file is)?
Thanks so much in advance!

Hi Matt,

I know this is very long after the fact and you probably don’t need this anymore, but did you get it to work in the end?

I would guess that you can put it in your conditions file with a name like “playLength” as the column header. Then, for the audio file, you can put $playLength for the duration.

I actually have a similar situation, but I’d like to automatically determine the length of a file I import rather than having to write it in the conditions file. If anyone knows how to do this, I would be very grateful!