Comments (5)
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
Chris
from diy-alexa.
I see, it's because now(with an update in October 2021) the /speech endpoint returns partial transcripts, which is mentioned in this issue:
wit-ai/wit#2206
from diy-alexa.
That's annoying. I guess we can apply the fix mentioned in that issue. I wonder why they changed it?
from diy-alexa.
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,
Xu
from diy-alexa.
Hi Chris, I just learned and fixed something. This is what I get on Terminal when I run:
$ curl -XPOST 'https://api.wit.ai/speech?v=20211231' -i -L -H "Authorization: Bearer my_access_key" -H "Content-Type: audio/wav" --data-binary "@apple.wav"
JSON return:
HTTP/1.1 100 Continue
Date: Sat, 01 Jan 2022 12:29:54 GMT
HTTP/1.1 200 OK
Content-Type: application/json
Date: Sat, 01 Jan 2022 12:29:54 GMT
Transfer-Encoding: chunked
Connection: keep-alive
{
"text": "Hey"
}
{
"text": "Hey Facebook"
}
{
"text": "This is Apple."
}
{
"entities": {
"fruit_type:fruit_type": [
{
//ignored
}
]
},
"intents": [
{
//ignored
}
],
"text": "This is Apple.",
"traits": {}
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:
String chunk = "";
int limit = 1;
String response="";
Serial.println(response);
do {
if (m_wifi_client->connected()) {
m_wifi_client->setTimeout(4000);
chunk = m_wifi_client->readStringUntil('\n');
response += chunk;
Serial.println(chunk);
}
} while (chunk.length() > 0 && ++limit < 1000);
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,
Xu
from diy-alexa.
Related Issues (20)
- Command
- Esp 32 code upload
- C code to python
- how to implement the code to esp32 HOT 1
- Can you reuse pin for audio input and output ? HOT 3
- export tflite model to c++
- DIY Alexa not connecting to wifi HOT 1
- DIY Alexa not working
- DIY Alexa is not response HOT 6
- I CANT GET SOUND OUTPUT HOT 2
- Guru Meditation Error HOT 1
- Limitations to .WAV file? HOT 1
- INMP441 microphone issue
- Not an issue but more of a question on how to complie the code HOT 1
- detect wakeword process not working HOT 2
- cannot compile code HOT 1
- INMP441 not working HOT 5
- ADC-related compile errors when shifting to ESP32S3 HOT 5
- Tensorflow.io import gfile
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diy-alexa.