Input device: Voice record (issue with the latency)


Author
Message
Saru
Saru
New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)
Group: Forum Members
Posts: 2, Visits: 19
Hi,

I am currently trying to program an experiment that records the verbal response provided by the participants. I used the /inputdevice = voice record one and it does record the response and also stores recordings. However, i am not sure about the latency it provides (in my case all of the trials have same latency). I want the response time (saved as latency if possible) to be time between  the stimulus onset (presentation of faces) and the first utterance by the participants.  I am a beginner in Inquisit and i am not sure what can be done for this. Could you please help me with this?

<defaults>
/minimumversion = "4.0.2.0"
/ fontstyle = ("Arial", 6.00%, true, false, false, false, 5, 1)

</defaults>

<values>
/completed = 0
</values>

<item PositiveHappy>
/1 = "004_o_m_h_b.jpg"
/2 = "005_o_f_h_a.jpg"
/3 = "006_m_f_h_b.jpg"
/4 = "007_m_m_h_b.jpg"
</item>

<item NegativeAngry>
/1 = "004_o_m_a_a.jpg"
/2 = "005_o_f_a_b.jpg"
/3 = "006_m_f_a_a.jpg"
/4 = "007_m_m_a_a.jpg"
</item>

<picture PositiveFace>
/ items = PositiveHappy
/ position = (50, 50)
/ size = (40%, 40%)


</picture>

<picture NegativeFace>
/ items = NegativeAngry
/ position = (50, 50)
/ size = (40%, 40%)

</picture>



<text fixation>
/ items = ("+")
/ color = black
</text>

<item BlankScreen>
/1= ""
</item>


<text BlankScreen>
/ items = BlankScreen
</text>


<page welcome>
Welcome to the Experiment 2.
</page>


<page end>
This is the end. Thank you for your participation.
</page>

<instruct>
/ fontstyle = ("Arial", 5%, true)
/ txcolor = black
/ windowsize = (90%, 90%)
/ screencolor = white
</instruct>

<htmlpage CongruentInstruction >
/ file = "In this specific task.htm"
</htmlpage>


<item PositiveInstructionImage>
/1 = "004_o_m_h_b.jpg"
</item>

<picture PositiveInstructionImage>
/ items = PositiveInstructionImage
/ position = (50, 50)
/ size = (40%, 40%)
</picture>

<item NegativeInstructionImage>
/1 = "004_o_m_a_a.jpg"
</item>

<picture NegativeInstructionImage>
/ items = NegativeInstructionImage
/ position = (50, 50)
/ size = (40%, 40%)
</picture>

<item VowelI>
/1 = "Bika.wav"
</item>

<sound VowelI>
/ items = VowelI
</sound>

<sound VowelO>
/ items = VowelO
</sound>

<item VowelO>
/1 = "Boka.wav"
</item>

<trial PreInstCong>
/ stimulustimes = [0 = text.fixation; 1500 =PositiveInstructionImage; 2500= sound.VowelI; 4500=NegativeInstructionImage; 5500=sound.VowelO ]
/ trialduration = 6500
/ inputdevice = keyboard
/ correctresponse = (" ")
</trial>


<trial PreInstInCong>
/ stimulustimes = [0 = text.fixation; 1500 =PositiveInstructionImage; 2500= sound.VowelO; 4500=NegativeInstructionImage; 5500=sound.Voweli]
/ trialduration = 6500
/ inputdevice = keyboard
/ correctresponse = (" ")
</trial>


<trial CongruentPositive>
/stimulustimes = [0 =fixation; 500 = BlankScreen; 1000=PositiveFace]
/ recorddata = true
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ trialduration = 3300
/ posttrialpause = 1000

</trial>

<trial CongruentNegative>
/stimulustimes = [0=fixation;500 = BlankScreen; 1000=NegativeFace]
/ recorddata = true
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ trialduration = 3300
/ posttrialpause = 1000

</trial>

<trial IncongruentPositive>
/stimulustimes = [0=fixation;500 = BlankScreen; 1000=PositiveFace]
/ recorddata = true
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ trialduration = 3300
/ posttrialpause = 1000

</trial>

<trial IncongruentNegative>
/stimulustimes = [0=fixation;500 = BlankScreen; 1000=NegativeFace]
/ recorddata = true
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ trialduration = 3300
/ posttrialpause = 1000
</trial>

<block Block0>
/ trials = [1-2= noreplace(PreInstCong, PreInstInCong)]
/ preinstructions = (htmlpage.CongruentInstruction)
/ postinstructions = ()
</block>

<block Block1>
/ trials = [1-4= noreplace(CongruentPositive, CongruentNegative)]
/ preinstructions = (htmlpage.CongruentInstruction)
</block>

<block Block2>
/ trials = [1-4= noreplace(IncongruentPositive, IncongruentNegative)]
/ preinstructions = (htmlpage.CongruentInstruction)
</block>


<expt>
/ blocks = [1=Block0; 2=Block1; 3=Block2]
/ preinstructions = (page.welcome)
/ postinstructions = (page.end)

/onexptend = [values.completed = 1]
</expt>



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 99K
Saru - 4/30/2024
Hi,

I am currently trying to program an experiment that records the verbal response provided by the participants. I used the /inputdevice = voice record one and it does record the response and also stores recordings. However, i am not sure about the latency it provides (in my case all of the trials have same latency). I want the response time (saved as latency if possible) to be time between  the stimulus onset (presentation of faces) and the first utterance by the participants.  I am a beginner in Inquisit and i am not sure what can be done for this. Could you please help me with this?

<defaults>
/minimumversion = "4.0.2.0"
/ fontstyle = ("Arial", 6.00%, true, false, false, false, 5, 1)

</defaults>

<values>
/completed = 0
</values>

<item PositiveHappy>
/1 = "004_o_m_h_b.jpg"
/2 = "005_o_f_h_a.jpg"
/3 = "006_m_f_h_b.jpg"
/4 = "007_m_m_h_b.jpg"
</item>

<item NegativeAngry>
/1 = "004_o_m_a_a.jpg"
/2 = "005_o_f_a_b.jpg"
/3 = "006_m_f_a_a.jpg"
/4 = "007_m_m_a_a.jpg"
</item>

<picture PositiveFace>
/ items = PositiveHappy
/ position = (50, 50)
/ size = (40%, 40%)


</picture>

<picture NegativeFace>
/ items = NegativeAngry
/ position = (50, 50)
/ size = (40%, 40%)

</picture>



<text fixation>
/ items = ("+")
/ color = black
</text>

<item BlankScreen>
/1= ""
</item>


<text BlankScreen>
/ items = BlankScreen
</text>


<page welcome>
Welcome to the Experiment 2.
</page>


<page end>
This is the end. Thank you for your participation.
</page>

<instruct>
/ fontstyle = ("Arial", 5%, true)
/ txcolor = black
/ windowsize = (90%, 90%)
/ screencolor = white
</instruct>

<htmlpage CongruentInstruction >
/ file = "In this specific task.htm"
</htmlpage>


<item PositiveInstructionImage>
/1 = "004_o_m_h_b.jpg"
</item>

<picture PositiveInstructionImage>
/ items = PositiveInstructionImage
/ position = (50, 50)
/ size = (40%, 40%)
</picture>

<item NegativeInstructionImage>
/1 = "004_o_m_a_a.jpg"
</item>

<picture NegativeInstructionImage>
/ items = NegativeInstructionImage
/ position = (50, 50)
/ size = (40%, 40%)
</picture>

<item VowelI>
/1 = "Bika.wav"
</item>

<sound VowelI>
/ items = VowelI
</sound>

<sound VowelO>
/ items = VowelO
</sound>

<item VowelO>
/1 = "Boka.wav"
</item>

<trial PreInstCong>
/ stimulustimes = [0 = text.fixation; 1500 =PositiveInstructionImage; 2500= sound.VowelI; 4500=NegativeInstructionImage; 5500=sound.VowelO ]
/ trialduration = 6500
/ inputdevice = keyboard
/ correctresponse = (" ")
</trial>


<trial PreInstInCong>
/ stimulustimes = [0 = text.fixation; 1500 =PositiveInstructionImage; 2500= sound.VowelO; 4500=NegativeInstructionImage; 5500=sound.Voweli]
/ trialduration = 6500
/ inputdevice = keyboard
/ correctresponse = (" ")
</trial>


<trial CongruentPositive>
/stimulustimes = [0 =fixation; 500 = BlankScreen; 1000=PositiveFace]
/ recorddata = true
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ trialduration = 3300
/ posttrialpause = 1000

</trial>

<trial CongruentNegative>
/stimulustimes = [0=fixation;500 = BlankScreen; 1000=NegativeFace]
/ recorddata = true
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ trialduration = 3300
/ posttrialpause = 1000

</trial>

<trial IncongruentPositive>
/stimulustimes = [0=fixation;500 = BlankScreen; 1000=PositiveFace]
/ recorddata = true
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ trialduration = 3300
/ posttrialpause = 1000

</trial>

<trial IncongruentNegative>
/stimulustimes = [0=fixation;500 = BlankScreen; 1000=NegativeFace]
/ recorddata = true
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ trialduration = 3300
/ posttrialpause = 1000
</trial>

<block Block0>
/ trials = [1-2= noreplace(PreInstCong, PreInstInCong)]
/ preinstructions = (htmlpage.CongruentInstruction)
/ postinstructions = ()
</block>

<block Block1>
/ trials = [1-4= noreplace(CongruentPositive, CongruentNegative)]
/ preinstructions = (htmlpage.CongruentInstruction)
</block>

<block Block2>
/ trials = [1-4= noreplace(IncongruentPositive, IncongruentNegative)]
/ preinstructions = (htmlpage.CongruentInstruction)
</block>


<expt>
/ blocks = [1=Block0; 2=Block1; 3=Block2]
/ preinstructions = (page.welcome)
/ postinstructions = (page.end)

/onexptend = [values.completed = 1]
</expt>



> However, i am not sure about the latency it provides (in my case all of the trials have same latency). I want the response time (saved as latency if possible) to be time between the stimulus onset (presentation of faces) and the first utterance by the participants.

That's what the code does, and it's working fine for me. If it doesn't on your system, that's probably an issue with the soundcard or microphone. How well voicerecord works varies greatly between systems and particular hardware.

You can fidlle around with different voicekeythreshold  ( https://www.millisecond.com/support/docs/v5/html/language/attributes/voicekeythreshold.htm ) settings to try and find the correct trip level for your hardware. Make sure your microphone is placed properly, and try a different sound interface if you have one available (external ones are often better than the cheap chipsets found in many PCs or laptops).

Saru
Saru
New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)New Member (8 reputation)
Group: Forum Members
Posts: 2, Visits: 19
Dave - 4/30/2024
Saru - 4/30/2024
Hi,

I am currently trying to program an experiment that records the verbal response provided by the participants. I used the /inputdevice = voice record one and it does record the response and also stores recordings. However, i am not sure about the latency it provides (in my case all of the trials have same latency). I want the response time (saved as latency if possible) to be time between  the stimulus onset (presentation of faces) and the first utterance by the participants.  I am a beginner in Inquisit and i am not sure what can be done for this. Could you please help me with this?

<defaults>
/minimumversion = "4.0.2.0"
/ fontstyle = ("Arial", 6.00%, true, false, false, false, 5, 1)

</defaults>

<values>
/completed = 0
</values>

<item PositiveHappy>
/1 = "004_o_m_h_b.jpg"
/2 = "005_o_f_h_a.jpg"
/3 = "006_m_f_h_b.jpg"
/4 = "007_m_m_h_b.jpg"
</item>

<item NegativeAngry>
/1 = "004_o_m_a_a.jpg"
/2 = "005_o_f_a_b.jpg"
/3 = "006_m_f_a_a.jpg"
/4 = "007_m_m_a_a.jpg"
</item>

<picture PositiveFace>
/ items = PositiveHappy
/ position = (50, 50)
/ size = (40%, 40%)


</picture>

<picture NegativeFace>
/ items = NegativeAngry
/ position = (50, 50)
/ size = (40%, 40%)

</picture>



<text fixation>
/ items = ("+")
/ color = black
</text>

<item BlankScreen>
/1= ""
</item>


<text BlankScreen>
/ items = BlankScreen
</text>


<page welcome>
Welcome to the Experiment 2.
</page>


<page end>
This is the end. Thank you for your participation.
</page>

<instruct>
/ fontstyle = ("Arial", 5%, true)
/ txcolor = black
/ windowsize = (90%, 90%)
/ screencolor = white
</instruct>

<htmlpage CongruentInstruction >
/ file = "In this specific task.htm"
</htmlpage>


<item PositiveInstructionImage>
/1 = "004_o_m_h_b.jpg"
</item>

<picture PositiveInstructionImage>
/ items = PositiveInstructionImage
/ position = (50, 50)
/ size = (40%, 40%)
</picture>

<item NegativeInstructionImage>
/1 = "004_o_m_a_a.jpg"
</item>

<picture NegativeInstructionImage>
/ items = NegativeInstructionImage
/ position = (50, 50)
/ size = (40%, 40%)
</picture>

<item VowelI>
/1 = "Bika.wav"
</item>

<sound VowelI>
/ items = VowelI
</sound>

<sound VowelO>
/ items = VowelO
</sound>

<item VowelO>
/1 = "Boka.wav"
</item>

<trial PreInstCong>
/ stimulustimes = [0 = text.fixation; 1500 =PositiveInstructionImage; 2500= sound.VowelI; 4500=NegativeInstructionImage; 5500=sound.VowelO ]
/ trialduration = 6500
/ inputdevice = keyboard
/ correctresponse = (" ")
</trial>


<trial PreInstInCong>
/ stimulustimes = [0 = text.fixation; 1500 =PositiveInstructionImage; 2500= sound.VowelO; 4500=NegativeInstructionImage; 5500=sound.Voweli]
/ trialduration = 6500
/ inputdevice = keyboard
/ correctresponse = (" ")
</trial>


<trial CongruentPositive>
/stimulustimes = [0 =fixation; 500 = BlankScreen; 1000=PositiveFace]
/ recorddata = true
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ trialduration = 3300
/ posttrialpause = 1000

</trial>

<trial CongruentNegative>
/stimulustimes = [0=fixation;500 = BlankScreen; 1000=NegativeFace]
/ recorddata = true
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ trialduration = 3300
/ posttrialpause = 1000

</trial>

<trial IncongruentPositive>
/stimulustimes = [0=fixation;500 = BlankScreen; 1000=PositiveFace]
/ recorddata = true
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ trialduration = 3300
/ posttrialpause = 1000

</trial>

<trial IncongruentNegative>
/stimulustimes = [0=fixation;500 = BlankScreen; 1000=NegativeFace]
/ recorddata = true
/ inputdevice = voicerecord
/ validresponse = (anyresponse)
/ trialduration = 3300
/ posttrialpause = 1000
</trial>

<block Block0>
/ trials = [1-2= noreplace(PreInstCong, PreInstInCong)]
/ preinstructions = (htmlpage.CongruentInstruction)
/ postinstructions = ()
</block>

<block Block1>
/ trials = [1-4= noreplace(CongruentPositive, CongruentNegative)]
/ preinstructions = (htmlpage.CongruentInstruction)
</block>

<block Block2>
/ trials = [1-4= noreplace(IncongruentPositive, IncongruentNegative)]
/ preinstructions = (htmlpage.CongruentInstruction)
</block>


<expt>
/ blocks = [1=Block0; 2=Block1; 3=Block2]
/ preinstructions = (page.welcome)
/ postinstructions = (page.end)

/onexptend = [values.completed = 1]
</expt>



> However, i am not sure about the latency it provides (in my case all of the trials have same latency). I want the response time (saved as latency if possible) to be time between the stimulus onset (presentation of faces) and the first utterance by the participants.

That's what the code does, and it's working fine for me. If it doesn't on your system, that's probably an issue with the soundcard or microphone. How well voicerecord works varies greatly between systems and particular hardware.

You can fidlle around with different voicekeythreshold  ( https://www.millisecond.com/support/docs/v5/html/language/attributes/voicekeythreshold.htm ) settings to try and find the correct trip level for your hardware. Make sure your microphone is placed properly, and try a different sound interface if you have one available (external ones are often better than the cheap chipsets found in many PCs or laptops).

Thankyou so much. It works fine now :)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search