'Hypothesis' object does not support indexing

34 views
Skip to first unread message

Tom

unread,
Sep 1, 2016, 2:12:36 PM9/1/16
to Jasper Support Forum
Hi,

I am getting a very annoying error which I am failing to grasp why it is happening. I have already had to tweak the code to get it running which could of had an effect but I don't see why. It obviously happens why I try to trigger Jasper by saying "Jasper".

Error:
TypeError: 'Hypothesis' object does not support indexing



In stt.py
try:
 recognition
= r.json()['Recognition']
 

 
if recognition['Status'] != 'OK':
 

 
raise ValueError(recognition['Status'])
 

 results
= [(x['Hypothesis'], x['Confidence'])
 
 
for x in recognition['NBest']]

Running on Debian - Jessie.

Maybe it is the Python version I am using? 2.7.12

Big thanks for any kind of help people can give!

Tom

Matthew Curry

unread,
Sep 1, 2016, 3:13:03 PM9/1/16
to Jasper Support Forum
never seen that, what image are you using?

Tom

unread,
Sep 1, 2016, 3:17:42 PM9/1/16
to Jasper Support Forum
Thanks for replying, I took it straight from GitHub

Matthew Curry

unread,
Sep 1, 2016, 3:43:33 PM9/1/16
to Jasper Support Forum
ah, it might be a dependency or something; I have created an image for RPI2/3 that works out of the box with wit.ai and our community tts server.  Its listed in the main description of the forum.

Tom

unread,
Sep 1, 2016, 5:20:07 PM9/1/16
to Jasper Support Forum
Ah great, don't have a pi handy but will look into setting up an ARM VM to give it a spin.

Cheers

Tom

unread,
Sep 1, 2016, 6:19:22 PM9/1/16
to Jasper Support Forum
I just started using Wit.ai now instead and it is all working!
Reply all
Reply to author
Forward
0 new messages