timing accuracy

PennController for IBEX Forums Support timing accuracy

This topic contains 5 replies, has 2 voices, and was last updated by Jeremy Jeremy 2 weeks, 2 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6478
    Avatar
    kimi
    Participant

    Hi,

    I am going to present some auditory questions which participants should respond as soon as they can. I am planning to measure the response time of each participants in different conditions. I wonder how would be the timing accuracy of recordings and how to best
    synchronize them with the presentation of audio stimuli.

    Thanks,
    Kimi

    #6479
    Jeremy
    Jeremy
    Keymaster

    Hi Kimi,

    When you use the .log command on an Audio element, it will report a line in the results file for when the audio starts and stops playing. When you use the .log command on an Key element, it will report a line in the results file for when (one of) the key(s) was pressed. You can then compare the different timestamps to determine how fast your participants were to press a key after the audio started or stopped playing

    Timing accuracy will vary depending on a range of factors for each of your participants, but it’s usually rather fine-grained, with margins of just tens of milliseconds (although accuracy will drop the more a participant’s browser lags)

    I’m not sure what you have in mind in terms of synchronizing things, but if you need to invite your participant to press a key in the middle of the audio, you can do something like this:

    newAudio("myAudio.mp3").log().play()
    ,
    newTimer(1000).start().wait() // wait 1s
    ,
    newText("Now press F or J").print()
    ,
    newKey("FJ").log().wait()
    ,
    getAudio("myAudio.mp3").wait("first")

    If your wait time is not constant, and assuming you are generating your trials in a template from a CSV table, you can make it so each row has, in addition to a column containing an audio filename, another column indicating how many milliseconds to wait, and refer to that column in place of 1000 in the sample code above

    Let me know if you have any questions

    Jeremy

    #6480
    Avatar
    kimi
    Participant

    Hi Jeremy,

    Thnaks for explanation.

    I plan to play an auditory recording for the participants which are some pre-recorder questions and participants should answer verbally as soon as they know the answer. I need to measure the time latencies of the verbal answer, I mean from offset of the auditory questions to onset of verbal responds. To get the precise result, do you suggest to define a pressing key element or clicking element before participants get start to be recorded and ask them to click before recording (which gives participnats some times to think wich is not desirebale) or just start recording element straight after playing is finished. In latter case, how we can measure the time of participants’ onset of speaking (which maybe is delayed than the start of recording and this is what I am going to measure).
    I hope I explained it clearly.

    Best,
    Kimi

    Kimi

    #6485
    Jeremy
    Jeremy
    Keymaster

    Hi Kimi,

    I didn’t realize you were recording audio responses. The log command on the MediaRecorder element will report when the recording started, so you’ll be able to compare that timestamp to the timestamps reported by your Audio element’s log command, and then manually measure when your participants start speaking in each of your collected recording files.

    Say your Audio element starts playback at timestamp 1111 and your MediaRecorder starts recording at timestamp 1234 (the timestamps in the results files are in fact much longer, but it doesn’t matter), and by analyzing the recorded sample you find a 250ms silence before your participant starts speaking. This means that your participant gave their audio response 1234-1111+250 = 373ms after the onset of your Audio stimulus.

    Let me know if you have any questions

    Jeremy

    #6508
    Avatar
    kimi
    Participant

    Hi Jeremy

    Thanks alot for your explanation.

    Would I face any problem or error if I start recording from the begining of the experiment or onset of the auditory question to the end of the verbal answer in order to get a probable overlap of question and answer? I mean maybe some participants can answer the question before the offset of the question (which indicate really fast response in specific condition).

    Best,
    Hakimeh

    #6509
    Jeremy
    Jeremy
    Keymaster

    Hi,

    You can tell a MediaRecorder element to start recording any time once the trial has started. Just make sure you have stopped your MediaRecorder element by the end of the trial, otherwise you might run into conflicts and/or massive audio files which could easily fail to upload.

    Let’s illustrate a situation where you start recording before starting audio playback. Say your MediaRecording starts recording at timestamp 1111, and your Audio element starts playback at timestamp 1234. By analyzing the recorded sample, you find a 450ms silence before your participant starts speaking. This means that your participant gave their audio response 1111+450-1234 = 327ms after the onset of your Audio stimulus. As you can see, the situation is very similar to the previous one, there’s no problem with it.

    Best,
    Jeremy

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.