Comments (10)
I just flashed 0.3.0-rc.2, but the timeout doesn't seem to have increased to 10 seconds (it seems to time out after 5 seconds for me). Also, what's the rationale behind such a short timeout? If I'm asking something, I'd probably prefer to wait for the response, rather than get an error, especially when the response does something somewhere (like add a calendar event).
Maybe 30 sec would be preferable? The best would be a configurable timeout via WAS, if possible.
from willow.
I suspect you're confusing the timeout to WIS with the timeout to the HTTP REST endpoint. That would explain why you're seeing 5s: https://github.com/espressif/esp-idf/blob/v5.1.1/components/esp_http_client/esp_http_client.c#L145. Can you confirm this?
As for the rationale for keeping timeouts short: we feel that having to wait too long for a voice assistant respond is terrible UX. We therefore reduced the timeout on the HTTP stream to WIS to 2s initially (af99de4) but as the ESP HTTP Client only has a single timeout setting that also resulted in aborting the connection to WIS is inference took longer than 2s, so we increased that slightly (67ff035) to allow users for testing self-hosted WIS on CPU before deciding to buy a GPU.
For the same reason of UX, we decided not to make this variable configurable at all, as it has the potential to kill the UX.
from willow.
Yes, sorry, I didn't realize that code wasn't for the API server. Is it possible to set the API server timeout to something long, 30 or 60 sec? Anything above that, I'd probably write something async and use the new (and fantastic) notifications feature.
I don't think the UX would suffer, especially if the request is abortable (ie I can say the wake word while waiting and it will cancel the old request and begin a new cycle).
from willow.
Please try enabling WAS Command Endpoint mode in WAS Advanced settings. The WAS REST Command Endpoint should have a timeout of 30s (toverainc/willow-application-server@ff86dd97). WAS Command Endpoint mode will eventually become default, and endpoint support will eventually be removed from Willow, so it's unlikely we will make any new changes to the endpoint code in Willow.
from willow.
I can certainly do that, thank you. Is there any documentation for how to use the command endpoint? I haven't managed to find anything on the Willow site or Google.
from willow.
Ah, is the difference that the WAS connects to my REST API, rather than Willow directly? I'm going to have some Docker rearranging, if so. Out of curiosity, doesn't that increase the latency?
from willow.
There is brief info about command endpoint support in WAS here.
Out of curiosity, doesn't that increase the latency?
We actually experience lower latency with WAS Command Endpoint mode. The WebSocket connection to WAS is always open, so there is no overhead to setup a new connection when you make a request. This now happens on the machine running WAS, which is almost always going to be more powerful than the ESP32-S3 in the Willow device.
from willow.
This worked great, thanks! There's only one bug: The screen turns off on the timeout, regardless of whether there's a request in flight. Instead, the screen should turn off timeout
seconds after the end of activity.
from willow.
Fixing that might be very tricky to get right. In any case, that belongs in a separate issue.
from willow.
Filed #349, thank you.
from willow.
Related Issues (20)
- Stuck at "Connecting to Wi-Fi..." HOT 4
- HA Sentence Wildcards Stops Willow HOT 3
- Willow fails to connect to WAS after updating HOT 3
- Trying to find timeout when calling REST command endpoint. HOT 4
- HASS Error: HTTP 255 HOT 3
- Respeaker support? HOT 5
- Identify does not work if device boots with mute active
- What is the cost for a custom wake word? HOT 1
- Driver update issue.
- How to send TTS reply sentence by sentence for longer text HOT 1
- Feature: Ability to configure custom integrations/APIs other than home assistant HOT 1
- Font size is too large for display, text cut off on ESP S3 Box 3 HOT 6
- Wake confirmation tone sometimes picked up as speech HOT 12
- Strange words when Willow is not undestanding the command. HOT 15
- When the "Wake Confirmation Tone" is used, it gets detected as "Ding!" HOT 6
- TTS response stopped working. HOT 3
- OpenAI APIs for TTS/STT? HOT 2
- Screen times out even with a request in flight HOT 10
- i2s is invalid on ESP32 Lite HOT 3
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 willow.