-
-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP response status is 200 but content is empty #42
Comments
I see, it's because now(with an update in October 2021) the /speech endpoint returns partial transcripts, which is mentioned in this issue: |
That's annoying. I guess we can apply the fix mentioned in that issue. I wonder why they changed it? |
Hi Chris, thanks for the quick reply. I am new to the web stuff, but I will try to fix it. But do you have some idea, why this update has no effect on your wit.ai app(everything works well with your acess_key)? Does this API update only apply to newly created app? Or actually your code already handles it correctly, I might make something wrong with my configuration... I really appreciate your help. Best regards, |
Hi Xu, I need to plug mine back together - it got taken apart for a new project and I need to re-assemble it. I'll have a look this weekend as it sounds like a simple fix. Best |
Hi Chris, I just learned and fixed something. This is what I get on Terminal when I run:
JSON return: HTTP/1.1 200 OK { For this chunked return, there is no "Content-Length" in the header part. Then in the code, I added these lines in if(status == 200), which I learned from Arduino community:
Then, I see exact the same JSON return as it is with above curl command. So happy to see this work! I will continue to work on the deserializeJson() part. Looking forward to your fix. Thank you. Best regards, |
Hi Chris, thank you so much for this open source project. You might have heard my voice if you checked your wit.ai app for this project.
I set up my hardware and flashed this code, then it works well for "Marvin" wake-up and following "tell me a joke" "what's the life" command.
The issue is:
But when I replace the URL and access_key with my settings(which works well with curl and my local recorded .wav samples), I don't get the expected JSON content, I added this debugging line in getResults(), but the returned entities, intents and text are all empty.
if (status == 200) { char temp[1024]; int read_cnt = m_wifi_client->readBytes(temp, 1024); Serial.printf("Http str is: %s\n", temp); }
Do you possibly have any clue? I am really confused since the only difference is the replacement with my wit.ai settings. And in my app, I did receive the recorded and uploaded voice sample. But it seems that the HTTP response got something wrong.
Thank you so much for any guidance for debugging.
Best regards,
Xu
The text was updated successfully, but these errors were encountered: