SRBOX speech input trigger

931 views
Skip to first unread message

Baris Demiral

unread,
Jun 28, 2011, 2:58:52 AM6/28/11
to e-p...@googlegroups.com
Dear E-prime users,

In our script, we have an e-prime object waiting for the speech input from SRBOX (with input key defined as "6"). We want to write an inline code (without jump) to make it possible to send a trigger as soon as the speech input is recognized. We do not want to use jump , becasue after this object there are things which should be executed. How do we write an inline script call like "If SRBOX.activated=TRUE, then WritePort.. " kind of description?

Also, in our tests, eventhough we increased the sensitivity of the SRBOX for speech input it writes the onset time of the speech as "0", I wonder there is something that we are missing...any suggestions?

Thank you for your help in advance,
Baris

--
SB Demiral, PhD.
Department of Psychology
7 George Square
The University of Edinburgh
Edinburgh, EH8 9JZ
UK
Phone: +44 (0131) 6503063

Michiel Spape

unread,
Jun 28, 2011, 6:56:54 AM6/28/11
to e-p...@googlegroups.com

Hiya,

The great benefit of the SRBOX as an inputdevice in E-Prime is that it is really nicely integrated into E-Prime. As such, of course you *can* try to poll it every once in a while, but the recommended way of dealing with these things is:

1.       Given that you have a stimulus, have some textdisplay with inputobject SRBOX.

2.       Send the trigger (inline aplenty around this group) as soon as input on voicekey is received, which terminates the object. Something like offset trigger enable? I can’t remember from the top of my head.

3.       Continue, if you must, the stimulus.

I imagine that you want to keep showing the stimulus even though voicekey input has been received so that merely the trigger is send but your (EEG?) data is not disrupted by offsets of stimuli, correct? In that case, I tend to find it easiest just to do either one of two things:

-          Have a ‘hidden’ object which has a long time limit (but 0 ms shown), which terminates if voicekey input has been received (so just add the SRBOX as input device there).

-          Show a stimulus that looks exactly like the stimulus to which people respond *after* that one. I.e., just a copy, with length desired-stimulus-length minus duration of preceding stimulus. That way, you can do all sorts of stuff in between presentation and the participant should never notice.

 

Finally, a word of caution: always see if you can get the voicekey/srbox to work in the simplest of setups: just one display with infinite duration, terminates only with SRBOX button input. If that doesn’t work, the SRBOX is probably incorrectly configured. If it does, continue with voicekey input. If that immediately, as you say, triggers the voicekey, see if the sensitivity is correct. Only after doing all this, I would continue making the real experiment.

Best,

Mich

 

Michiel Spapé

Research Fellow

Perception & Action group

University of Nottingham

School of Psychology

www.cognitology.eu

--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.


This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.

David McFarlane

unread,
Jun 28, 2011, 11:51:00 AM6/28/11
to e-p...@googlegroups.com
Baris,

Stock reminder: 1) I do not work for PST. 2) PST's trained staff
takes any and all questions at
http://support.pstnet.com/e%2Dprime/support/login.asp , and they
strive to respond to all requests in 24-48 hours -- this is pretty
much their substitute for proper documentation, so make full use of
it. 3) If you do get an answer from PST Web Support, please extend
the courtesy of posting their reply back here for the sake of others.

That said, here is my take...

You have three issues mixed together here:

1) Sending a signal to external equipment following a response.

2) Using the SRBox for a response.

3) Using the SRBox as a voicekey.

I like to think that you have sorted 2 & 3; if not, first heed Mich's
advice to start small and work up from there. OTOH I am puzzled by
your statement that "it writes the onset time of the speech as
'0'". That makes no sense. Onset times are in ms from the start of
the session, so it is completely impossible to get onset times of
0. Perhaps you meant something else?

But on to issue 1. By "we have an e-prime object waiting for the
speech input from SRBOX" do you mean that your stimulus object (let's
call it StimSlide) has a Duration of (infinite) and End Action
Terminate (i.e., a self-paced stimulus terminated only by voice
response)? And you want to send the same signal to your external
device whenever the subject responds? If so, you might use the
OnsetSignal... and OffsetSignal... properties. I would set this up
using inline code at the start of the program, something like

Const Lpt1Port as Integer = &h0378 ' adjust to match your system
Const RespSignal as Integer = &hFF ' adjust for your signal

StimSlide.OnsetSignalPort = Lpt1Port
StimSlide.OnsetSignalData = 0 ' reset output at start of stimulus
StimSlide.OnsetSignalEnabled = True
StimSlide.OffsetSignalPort = Lpt1Port
StimSlide.OffsetSignalData = RespSignal
StimSlide.OffsetSignalEnabled = True

You can learn more about these properties by looking up the
appropriate topics in the E-Basic Help facility. StimSlide will now
send the RespSignal at its offset, which happens as soon as it gets a
response. Note that I set OnsetSignalData to 0 -- RespSignal stays
on the output port until something else replaces it, here I use the
OnsetSignal to reset the port, you could also use other means.

But suppose your stimulus has a time limit, so that it might
terminate without a response, and you want a signal only in the case
of a response. In that case you might skip all the
Onset/OffsetSignal... stuff above, and do something like the
following in inline code right after your stimulus:

Const Lpt1Port as Integer = &h0378 ' adjust to match your system
Const RespSignal as Integer = &hFF ' adjust for your signal
Const SignalDur as Long = 10
If (StimSlide.RT > 0) Then
WritePort Lpt1Port, RespSignal
Sleep SignalDur
WritePort Lpt1Port, 0 ' reset output
End If

(This uses .RT to detect a response, for other options see my
comments at
http://groups.google.com/group/e-prime/browse_thread/thread/5e712b8b726ea0de/798ed4c44b6c44e3
.)

For more discussion on this, and a solution to a more complex
scenario (sending signal at time of response while letting the
stimulus continue its Duration), see threads at
http://groups.google.com/group/e-prime/browse_thread/thread/abec5564c65de738
and
http://groups.google.com/group/e-prime/browse_thread/thread/cfc3d0307d5c7fbd
(which you could have found by doing a search using terms like "OnsetSignal").

-- David McFarlane, Professional Faultfinder
"For a successful technology, reality must take precedence over
public relations, for nature cannot be fooled." (Richard Feynman,
Nobel prize-winning physicist)

Reply all
Reply to author
Forward
0 new messages