Comments (1)
Maybe related observation: by default my C# ASP.NET API uses Transfer-Encoding: chunked and it does not return a Content-Length header. In that case willow just reads aloud "Success" instead of the body I send, because it fails to determine the length. If I change my code to force it to send Content-Length, then it reads the body correctly.
This got me thinking... could my request above be implemented using chunked transfer encoding?
Something like this proposal from GPT-4:
[HttpGet("stream")]
public async Task StreamResponse()
{
Response.Headers.Add("Transfer-Encoding", "chunked");
foreach (var part in GetDataParts())
{
await Response.WriteAsync(part);
await Response.Body.FlushAsync(); // Important to flush the stream
// Simulate some real-time delay or processing
await Task.Delay(1000);
}
}
private IEnumerable<string> GetDataParts()
{
yield return "Part 1 ";
yield return "Part 2 ";
yield return "Part 3 ";
}
The difficulty is that then the ESP box would need to keep contacting the inference server to get audio for each separate sentence as in comes in.
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.
- 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
- Increase the HTTP timeout HOT 10
- 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.