Is high CPU usage normal with voice assistant?

Hi, I’ve added an Atom Echo and am enjoying playing with it. However, I’ve also noticed a jump in CPU usage on my Home Assistant server since I added wyoming-openwakeword.

I’m using a container installation and a docker-compose.yml starts HA and various dependent services (e.g., zwave2mqtt). The new service I’ve added is rhasspy/wyoming-openwakeword and now I see a new python3 process that is sometimes taking more than 100% of CPU (compared with around 30% for HA).

Is this normal? Is there a better way to run this?

They said on the year of the voice video intros that a single pi4 was expected to support up to about 5 simultaneous streams. The fact you’re not on a pi and the exact number is not important but what that means is YES there’s an upper limit and yes you should expect higher usage. (it’s listening to a stream picking out the wake words figuring out all the intents, etc.)

Have you allocated enough resources?

I’m not sure. I didn’t do anything special with docker or docker compose, if that’s what you mean. I have a pi 4 with 8GB of RAM.

version: '3'
services:
  homeassistant:
    container_name: homeassistant
    image: ghcr.io/home-assistant/home-assistant:stable
    volumes:
      - /media/homeassistant/home_assistant:/config
      - /etc/localtime:/etc/localtime:ro
      - /media/homeassistant/media:/media
    restart: unless-stopped
    network_mode: host
    devices:
      - '/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_c625d2963e7ded119b63bc6c4fc49859-if00-port0:/dev/ttyUSB0'
# [... a couple of other services omitted here ...]
  openwakeword:
    container_name: openwakeword
    image: rhasspy/wyoming-openwakeword
    volumes:
      - /media/homeassistant/home_assistant/openwakeword/custom:/custom
      - /media/homeassistant/home_assistant/openwakeword/config:/config
      - /media/homeassistant/home_assistant/openwakework/data:/data
    environment:
      TZ: "Europe/London"
    depends_on:
      - homeassistant
    ports:
      - 10400:10400
      - 10400:10400/udp
    command: --preload-model 'ok_nabu' --custom-model-dir /custom
    restart: unless-stopped

Ah sorry I misunderstood I thought you were on something like proxmox. I that case. I’m absolutely not suprised

Im planning an upgrade to a NUC specifically for Assist for this reason. I’m already running half a dozen addons and see 20% utilization at idle. When I enable voice I see an immediate jump in cpu and memory use (of course using more) and higher cpu during an active call (im going the voip route and plan on tying it to speakerphones I already have around the house)

Basically the pi4b/8g I have is good enough for test and won’t be good enough for production when I get it situated…

I think, by default, there aren’t any limits on cpu or ram for docker containers.

I do notice that the cpu seems to stay above 100% for awhile after using voice commands, but then seems to settle down a bit, into the 30%-40% range.

Basically the pi4b/8g I have is good enough for test and won’t be good enough for production when I get it situated…

Well, I’m just playing with it. Just a couple of simple commands. I may do the same as you and try some better hardware if usage becomes more serious.

EDIT: To be clear, I’m “playing” with the Atom Echo, not HA. The Pi4 is running a production home assistant with 100+ devices and has for years now. It’s got an SSD, but is otherwise a bog standard pi4.

I still may update the hardware if the wife really likes the voice stuff.

1 Like