calling up the sound recorder inline
I want to call up the sound recorder in an inline script - is that possible? It seems really simple, but I can't find the answer anywhere...
The experiment is a simple random automated picture naming test & looks as below. It all works as it should in terms of displaying the stimuli; I just can't figure out how to call up the recorder in the script. I put in comments in the run phase where recording should start/stop.
I'm grateful for any advice!
from random import shuffle global pic_list pic_list = range(1,100) shuffle (pic_list) global pic_list pic = pic_list.pop() #prepare sampler src=pool['ding1295ms.wav'] my_sampler = sampler(src, volume=.4) #prepare fixdod fixdot_canvas = canvas() fixdot_canvas.fixdot(color='white') #prepare cue canvas cue_canvas=canvas() path=exp.pool[u'cue_wym.png'] #cue tells participant what language to name the pic in cue_canvas.image(path, scale=.1) #prepare target canvas target_canvas = canvas(background_color=u'thistle') path=exp.pool[u'RANstim_%2d.png' % pic] target_canvas.image(path, scale=.2 #prepare blank canvas blank_canvas=canvas()
my_sampler.play() fixdot_canvas.show() clock.sleep(995) cue_canvas.show() clock.sleep(495) #Recording should start here & have to define .wav format and the output file (path + pic number) target_canvas.show() clock.sleep.(495) blank_canvas.show() clock.sleep(3995) #stop recording