psychopy.org | Reference | Downloads | Github

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!