synesthesiam/homeassistant-satellite

Arecord overrun

Opened this issue · 2 comments

I saw that the year of voice article said "turn any old raspberry pi to a satelite"
So I decided to try it out with my old raspberry pi 1 b.
When ever I try to run the script with debug mode activated I get
overrun!!! (at least 10.856 ms long)
And it takes a long time before I even hear the awake ding.
It works, just very very slow.
My home assistant installation is being runned by a poweful server.

When ever I try with my phone or the webui it is almost instantaneously.
I am using a nedis usb conference phone as my mic and my speaker.
Ive tried to change sd card if it had something to do with a bad card.
Also decided to remove any other usb connected devices such as a keyboard. Just to rule out power issue delivered to the usb ports or unessesary cpu usage.

Some has declared that if you use arecord and record to a non xfs formated storage you probably will see this error.
But we are not recording anything, right? We are just streaming the data to hassio?!

There is also some info about chaning the buffer could solve this issue. Is this something we can do within the script?

The cpu load is near 100%.
Have tried raspberry pi OS lite, and dietpi.
Dietpi does not work at all, I cannot get past the setup due to error bulding wheel of aiohttp and yarl and stuff.

Love your work here!

EDIT:
Manage to get rid of the overrun by not using the volume-multiplier
The cpu usage is around 20-35%.
But when I look in the homeassistant voice debug I can see that the "action" speech-to-text is taking around 20 seconds to finish.

Wonder if this is normal, even for a Pi 1B, when the esp32 is powered by alot slower CPU.

EDIT 2:
When I remove both awake and done sound the speech-to-text goes from ~20 to ~5 seconds.
Why is this?

So the total time is now down to around 7 seconds (From wakeword to activation) Which is pretty good. But I have no Idea if the wake word is triggered because I had to remove the wakening ding.

There are a few other audio backends coming soon, so keep an eye on the repo 👍

Any update on this I'm having similar performance issues with Pi zero W
Zero 2Ws and 3 both work fine