I`ve been having difficulty with using Speech Recognition to operate a Stroop test.
Essentially, I have a function that randomly generates a color word (i.e., red, blue) and the participant has to say the color of the word (which are the always same for now during testing - congruent). The goal of the Stroop test is to compare the differences in speed (or intereference) when it comes to recognizing congruent and incongruent color + color words.
-At the start of the layout I request speech recognition (language ?n`, Continuous mode, Interim results).
-When permission is given, call the function to randomly get a color + word.
-``On speech recognition result
if word color (as a string) == UserMedia.InterimTranscript
do add to correct, call function``
My problem is that a successful speech only works ONCE, even though the comparison values match at numerous times, as shown in the debugger. I have a button to manually jog the test and the function seems to work fine; however, I believe it has something to do with subsequent comparisons using the InterimTranscript value, but it`s hard to be certain given the lack of articles and information on speech recognition since it is such a new feature.
What do you think?
Thanks for taking the time to check out my question.