| Reference | Downloads | Github

Export stimulus as audio file (e.g. OGG, WAV)

Hey! I’ve been trying to do something that might be quite simple: exporting an audio stimulus, built using PsychoPy3, as a supplementary file. Is this something that is supported?

For example, with pyo as a backend, I could do something ugly like in the snippet below.

prefs.hardware['audioLib'] = ['pyo']
tone = Sound()
pyo.savefile(tone._snd.table.getTable(), 'test.ogg', fileformat=7, ...)

However, I’d like to do this for the entire stimulus (i.e. all sequenced tones). It’d be great to somehow export a list/np.array of samples.

Maybe there’s an obvious reason why this isn’t possible?

Thanks so much!