Open bogorad opened 8 months ago
I started a feature request: https://community.home-assistant.io/t/voice-multiple-voice-assistants-1-wake-word-and-pipeline/658620
I started a feature request:
voted :)
Also voted.
You can already have this in the current version: start 2 satellites. :) I have it working with 2 different wake words connected to different pipelines. This is great for having different languages or test different assistants without breaking the current one.
With 2 assistants running on a Raspberry Pi Zero 2, it rarely stays beyond 20% CPU. I'm using local wake word with openwakeword.
To have it done, you have to configure audio (alsa) to allow sharing mic and output. You have also to manually specify the zeroconf host name (as the default is the mac address) and configure different ports for each.
@synesthesiam I would suggest to change the zeroconf host name from the mac to the satellite name so that would be transparent. If you agree, I can send a PR.
I'm using local wake word with openwakeword.
are you running one copy of OWW?
I'm using local wake word with openwakeword.
are you running one copy of OWW?
No, one pair openwakeword + satellite per assistant (responding to different wake words). The led service is the same and respond to both instances of the satellite.
I'm using local wake word with openwakeword.
are you running one copy of OWW?
Your question got me thinking and I decided to look at the code and give it a try. It happens @synesthesiam is brillant: OpenWakeWord already supports multiple WW at the same time.
So, you need just one copy of OWW with multiple pre-load arguments, one for each word.
And then you can run as many satellites as you want, connected to the same service and it all works great. And no more CPU increase and the word detection is the only (and now single) heavy process.
I would mark this issue as closed. :)
I would mark this issue as closed. :)
nope :)
I would mark this issue as closed. :)
nope :)
The reason being… ?
The reason being… ?
Because it's a waste. If I want three languages and HA control, it'd be four instances of W-Satellite.
I would mark this issue as closed. :)
nope :)
The reason being… ?
Also, as far as I can tell, whilst it might support > 1 wakeword it doesn't trigger >1 pipeline in most use cases users want one pipeline per wakeword. Also it would be good if the entities were also created per wakeword.
far as I can tell, whilst it might support > 1 wakeword it doesn't trigger >1 pipeline
this solution does.
Also, as far as I can tell, whilst it might support > 1 wakeword it doesn't trigger >1 pipeline in most use cases users want one pipeline per wakeword. Also it would be good if the entities were also created per wakeword.
The wake word service just trigger the satelitte (s). Each satellite instance have it's own pipeline and own entities in home assistant and are independent.
In my test setup, each wake word responds in different language from different assistants in HA.
To have it done, you have to configure audio (alsa) to allow sharing mic and output. You have also to manually specify the zeroconf host name (as the default is the mac address) and configure different ports for each.
How were you able to do that? I configured alsa and was able to record from two processes running on the host, but inside docker one container somehow gets exclusive access.
/etc/asound.conf
:
pcm.multimic {
type dsnoop
ipc_key 1025
ipc_perm 0666
slave {
pcm "hw:CARD=P3200M,DEV=0"
channels 1
}
}
and docker-compose:
sat-chewbacca:
image: w-sat
container_name: sat-chewbacca
hostname: sat-chewbacca
privileged: true
devices:
- /dev/snd
group_add:
- 29
volumes:
- /etc/asound.conf:/etc/asound.conf:ro
- /usr/share/alsa:/usr/share/alsa:ro
ports:
- "10100:10100"
command:
- "--uri"
- "tcp://0.0.0.0:10100"
- "--name"
- "dining-chewbacca"
- "--mic-command"
- "arecord -r 16000 -c 1 -f S16_LE -t raw -D multimic"
- "--snd-command"
- "aplay -r 22050 -c 1 -f S16_LE -t raw -D plughw:CARD=P3200M,DEV=0 --nonblock"
- "--debug"
- "--wake-word-name"
- "hey_chewbacca"
- "--wake-uri"
- "tcp://oww:10400"
You can already have this in the current version: start 2 satellites. :) I have it working with 2 different wake words connected to different pipelines. This is great for having different languages or test different assistants without breaking the current one.
With 2 assistants running on a Raspberry Pi Zero 2, it rarely stays beyond 20% CPU. I'm using local wake word with openwakeword.
To have it done, you have to configure audio (alsa) to allow sharing mic and output. You have also to manually specify the zeroconf host name (as the default is the mac address) and configure different ports for each.
@synesthesiam I would suggest to change the zeroconf host name from the mac to the satellite name so that would be transparent. If you agree, I can send a PR.
Can you please share how you managed to configure alsa so that the mic and speaker are shared between 2 satellite processes?
Voted ;)
e.g., "hey Claude" for Anthropic, "Hey Gemini" for google, etc.