I attached a microphone to the speaker, which is connected to the flash system. As soon as the speaker emits a sound, the microphone picks it up and sends a signal to the flashes to trigger them. I took the images in a completely darkened room, so I can just leave the shutter open for a few seconds, only the event illuminated by the triggered flash is captured.