Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Record Audio and Response time from voicekey input

edited December 2014 in OpenSesame

Hello,
I'm trying to set up an experiment with OpenSesame (a picture naming task). I tried to use soundrecorder plugin and it's working fine. OS saves the audio file for every picture presented. I want to save also the response time of the participant (when the participant starts to talk). It's possible to take this "response time" from the soundrecorder object? Do you have any suggestion?
Thanks in advance, Paolo

I'm sorry, I also posted on this discussion before but after that I saw that was marked as solved.
audio input as response/variable

I tried the voice key example from the discussion linked, but is not working and also I have to restart open sesame every run. Please build and install the PortAudio Python bindings first.

W7.64bit - OS 2.9.1 (32bit) - Python 2.7.3 (32) PyAudio-0.2.8 and pymedia-1.3.7.3

Comments

  • edited 6:00PM

    Hi,

    The soundrecorder plug-ins only save the sound files, and don't provide any way to analyze them online. To do so, you would need to write a script, such as the one from the discussion you're referring to. (Although the initialization problem with pyaudio can be annoying.)

    However, I would say it's much better to save the sound files to disk, and to determine vocal RTs afterwards during the analysis. This way you can take your time to find the optimal parameters for detecting vocal responses, because it's very difficult to do this online. Or is it important to have the vocal RTs during the experiment, for example to provide feedback?

    Cheers,
    Sebastiaan

  • edited December 2014

    Thanks for your reply.
    I'm trying to "convert" some experiments from DMDX.
    DMDX record the Vocal Rt and also the audio and then, after the experiment, you can adjust the rt according to the audio file.

    In this experiment I don't need the RT during the execution.
    So I can infer the vocal RT after my experiment is finished.

    I have two question:

    1. If I record the audio, which software I should use to extract the rt from audio file? (Audacity)
    2. I record one audio file for every loop cycle (stimuli). I have the audio file, but how can I know when (in time) my stimuli appears to measure the real response time?
      In other words, how can I start recording at the same time in which the stimulus appears?

    This is my OS structure:

    1. Experiment
    2. Loop (Setting variable)
    3. Sequence
    4. Sketchpad (Fixpoint)
    5. StartRecording
    6. Sketchpad (Stimuli)
    7. StopRecording
    8. Logger

    Thanks,
    Paolo.

  • edited 6:00PM

    Hi Paolo,

    If I record the audio, which software I should use to extract the rt from audio file? (Audacity)

    There is no standard software or procedure to do this. Most people use some custom algorithm, combined with visual inspection of the audio file. You could take a look at this paper by @lvanderlinden. It's mostly about EMG onset detection, but the problem and technique is similar for voice onset detection (the algorithm is linked to in the paper):

    (DMDX probably makes vocal RT detection look really easy, but, if so, that's because it uses a very crude algorithm, such as a simple loudness threshold.)

    I record one audio file for every loop cycle (stimuli). I have the audio file, but how can I know when (in time) my stimuli appears to measure the real response time? In other words, how can I start recording at the same time in which the stimulus appears?

    Recording will start where you insert the sound_start_recording plug-in. In your case, you inserted it right before the sketchpad with your stimulus, so the recording will start at stimulus presentation.

    A word of caution though: The timing of sound playback and recording can be very unreliable. This depends on many factors, mostly the specifics of your system. If you have the equipment to do so, I would test the timing beforehand.

    Cheers!
    Sebastiaan

  • edited 6:00PM

    Thanks for your advice.
    Now I have more clear some of the problem and how to solve it.
    Best Regards,
    Paolo

Sign In or Register to comment.