detecting voice onset times in Matlab

Kao-Ping Chua wrote:

> Basically, I need to find a way to reliably record voice onset times ...
> Is there a function in Psychtoolbox that can do this ?

Kao-Ping,

Many Macs and Windows PCs are equipped with audio digitizers, but the
Psychtoolbox does not provide functions which read samples from those
digitizers into Matlab. I think such functions would be a useful addition
to the Psychtoolbox. However, right now my highest priority is eliminating
bugs from the Windows version of the Psychtoolbox.

If built-in audio digitizers can be made to work with Matlab, then that
would be good solution because no extra hardware would be required. I can
think of some alternatives which require more hardware and expense but less
programming effort:

1- Use an external circuit to detect voice onset. Convert the one-bit
output of the voice detector to rs-232 voltage levels and plug it into one
of the handshaking pins of a serial port. You can poll the state of the
pin from within Matlab using the psychtoolbox Serial function. This scheme
is pretty sure to work and there should not be latency problems. The
downside is that someone has to build stuff.

2- If you are using the Windows version of Matlab, then you could have a
look at the Mathworks Data Acquisition Toolbox. The downside is that it's
not cheap and there could be unresolvable latency problems which you
discover after some expense and effort.

3- The CMU button box has a voice detector, and you can talk to the button
box from Mac Matlab using Brian Stankiewicz's mex files, see
http://vision.psych.umn.edu/www/people/brian/Mex_Files/Mex_Files.html
Downside here is also expense, unless you already have a CMU box. I'm
not sure about latency issues.

I am copying this message to the psychtoolbox forum in case anyone there
has something helpful to add.

Best,

Allen




Kao-Ping Chua wrote:

> Hello, I've looked around for the answer to this question on the
> Psychtoolbox website but couldn't find it. Basically, I need to find a
> way to reliably record voice onset times; I need to be able to see how
> long it takes for a subject to respond orally after a particular
> stimulus appears on the screen. Is there a function in Psychtoolbox
> that can do this, and is this even possible to do in MATLAB?
>
> Thanks very much.
> Kao-Ping Chua
> Kao-Ping Chua wrote:
>> Basically, I need to find a way to reliably record voice onset times ...
>> Is there a function in Psychtoolbox that can do this ?
On 6/7/01 5:04 AM, "Allen W. Ingling" <ingling@...> wrote:
> Many Macs and Windows PCs are equipped with audio digitizers, but the
> Psychtoolbox does not provide functions which read samples from those
> digitizers into Matlab. I think such functions would be a useful addition
> to the Psychtoolbox.

We have code for using any sound device including the built-in sound) as a
voice key. This has a graphical threshold setting, stores the sound to disk
(with a user-selected pre-trigger sample) as well as returning the RT.

You can use this directly from PsyScript
<www.maccs.mq.edu.au/~tim/psyscript>

The source code to PsyScript is open - if you want it just ask. I will aim
to publish the source code publicly quite shortly. I think that there are
probably several useful pieces of code in their (for detecting responses,
loading QuickTime stimuli etc.) and you are all welcome to share this
investment.

tim