wit-ai/wit-ios

Getting a lot of what looks to be JSON parsing errors

KyleLeneau opened this issue · 4 comments

I am seeing a bunch of these errors now in the console when running my app:

error: The operation couldn’t be completed. (Cocoa error 3840.)

A little digging on StackOverflow and it looks like some type of JSON parsing error. Any ideas?

Hm weird, I don't have this error following the Wit iOS tutorial using Wit.framework 1.1.0.
A parsing error would be passed to witDidGraspIntent:
Do you have any additional info?

All I know is that I am trying to say "Good Morning" and am getting this error about half (or more) of the time. It's being logged by the existence of an error check (NSLog) in my witDidGraspIntent delegate.

Could it be possible that the recording is not being completed by the time the recording request is going out? I guess I am not quit sure how that recording is happening on a stream and then being chunked to the API.

Indeed, the buffer being written was not flushed before sending out the HTTP request.
This caused the error for very short sentences.
1.1.1 fixes that!

Thanks for your feedback, I'll let you close the issue

This looks like it is working as expected now. Saw a few speech recognition failures but so far so good for my limited prototyping. Thanks for the help and release.