Ending stimulus after speech

Hi all,

I am creating a picture naming study and I have given participants 3 seconds to name each picture which of course is plenty of time. I’m not great with python and I essentially want the picture to disappear and the trial to move to the next after the participant names the picture. I’m trying to figure out how to use the microphone to code this but I am having no luck. Any help is appreciated, thank you!