PennController for IBEX › Forums › Support › Playing audio word-by-word › Reply To: Playing audio word-by-word
August 12, 2020 at 1:01 pm
#5975
![](https://www.pcibex.net/wp-content/uploads/2018/10/IMG_8365-e1540835663655-150x150.jpg)
Keymaster
Hi,
The callback command is a non-blocking command, meaning that everything after the closing parenthesis of callback will be executed immediately, with no further delay. You probably want to use the blocking command wait instead:
newTrial("test_audio", newAudio("test", "2fishRoundTank.mp3") .play() .log() // .print() // Do you really want to show the player? , newTimer("reg1", 800).start().wait(), getAudio("test").pause(), newKey("next", " ").log().wait() , getAudio("test").play(), newTimer("reg2", 400).start().wait(), // I assume you want to play the next 400ms getAudio("test").pause(), getKey("next").wait() , getAudio("test").play(), newTimer("reg3", 400).start().wait(), getAudio("test").pause(), getKey("next").wait() , newButton("Next") .print() .wait() )
Jeremy