StreamAssist
StreamAssist copied to clipboard
Massive CPU consumption increase when StreamAssist is running
Hello! Thank you for this amazing solution to Voice Assistant - it is actually viable now.
I did notice that my HA VM CPU consumption skyrocketed after I got StreamAssist up and running. Every component in the pipeline is offloaded to individual containers in my Proxmox host: go2rtc, ollama, whisper, piper and openWakeWord are all running in containers outside of the HA VM. I even made the streams in go2rtc only serve audio so no video data is sent to HA in hopes to reduce the CPU consumption with no luck.
What exactly could be consuming so much CPU within StreamAssist?
Please also notice how the CPU usage immediately goes back to normal when StreamAssist is disabled in HomeAssistant.
I think what's causing so much CPU consumption is the audio resampling in stream.py.
You should use applications like top or htop, to know what software are consuming CPU.
You should use applications like top or htop, to know what software are consuming CPU.
It is StreamAssist that's consuming the CPU.
Why you think so? StreamAssist it's not even an app. This is the HA module. The CPU can be consumed by the entire HA process.
Why you think so? StreamAssist it's not even an app. This is the HA module. The CPU can be consumed by the entire HA process.
Please take a look at the screenshot. It shows a 50% increase in CPU usage when StreamAssist is installed and configured with 2 pipelines. As soon as the StreamAssist instances are disabled within Home Assistant, CPU usage goes back to normal.
The same behavior has been reported before in issue #18 by another user.
I'll try to check same situation when have time.
I'll try to check same situation when have time.
Thank you, I really appreciate it. StreamAssist is exactly what Voice Assistant should be out of the box. Honestly should be part of HA Core. What you came up with is amazing.
Unfortunately with such increase in CPU usage it makes it not viable at the moment. Hopefully you can pinpoint what's causing it.
I think its the wake word handling. I noticed increase power usage and when i checked the add on, the wake word one was using 20% of the cpu. so i turned it all off, and power usage went down.