Difficulty specifying expected words for microphone

I am trying to specify words for the transcription to identify. I have tried several variants of what I believe is requested. For example, when I put “‘red:100’, ‘green:80’” in the Expected Words field in the transcription tab, I get the following error:

Traceback (most recent call last):
File “C:\Users\Eliot\Documents\Work\PsychPyCode\ASR\ASR1.py”, line 282, in
language=‘en-US’, expectedWords=[‘red:100’, ‘green:80’]
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\sound\microphone.py”, line 931, in bank
engine=engine, **kwargs)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\sound\audioclip.py”, line 758, in transcribe
config=config)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\sound\transcribe.py”, line 345, in transcribe
config=config)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\sound\transcribe.py”, line 512, in recognizeSphinx
respAPI = recogBase.recognize_sphinx(audioData, **config)
File "C:\Program Files\PsychoPy\lib\site-packages\speech_recognition_init
.py", line 725, in recognize_sphinx
assert keyword_entries is None or all(isinstance(keyword, (type(""), type(u""))) and 0 <= sensitivity <= 1 for keyword, sensitivity in keyword_entries), "keyword_entries must be None or a list of pairs of strings and numbers between 0 and 1"
File “C:\Program Files\PsychoPy\lib\site-packages\speech_recognition_init_.py”, line 725, in
assert keyword_entries is None or all(isinstance(keyword, (type(""), type(u""))) and 0 <= sensitivity <= 1 for keyword, sensitivity in keyword_entries), "keyword_entries must be None or a list of pairs of strings and numbers between 0 and 1"
ValueError: not enough values to unpack (expected 2, got 1)

Experiment ended.

Thanks!

We’re having this same issue, can’t find any combination that works. Did you find a solution?

EDIT: I suspect this is an issue with the “transcribe.py” file around line 500. It looks like the zip function is not stitching the variables together in the right format. I moved the stitch command up to the return function from parseExpectedWords at line 419 so it looks like “return tuple(zip(wordList, sensitivities))”. Now I get output that only matches the word list.