A Wyoming Satellite Voice Assistant to Control my Home Assistant Smart Home and Play my favourite songs. Go Local be Secure

@Dark1886 This is a post with many links discussing this effort.

The first announcement I saw of the satellite was on The Verge in April of this year.

The satellite was also discussed in the Year of Voice Chapter 7 Livestream, at about 01:58:00.

It’s important to note that the “ReSpeaker Lite” is a different product than what Nabu Casa is developing, even though they have similar internals.

So we have 3 voice satellites that should be available by the end of the year:

All three will feature some variant of the ESP32-S3 running ESPHome and the XMOS XU316 chip for audio processing. They will differ, however, in their enclosures, sensors, and LEDs, buttons, expansion ports, etc. The hope is that there will be something for everyone :slightly_smiling_face:

5 Likes

Hi, I’m making my voice assistant with a rpi4 and a Raspiaudio Ultra++, I download the drivers following the instruction on the website (GitHub - waveshareteam/WM8960-Audio-HAT: The drivers of [WM8960 Audio HAT] for Raspberry Pi), anyway it’s a wm8960 soundcard and you can find them easily.
In my case I can install wyoming, openwakeword and it’s kind of working and can arecord and aplay, sometimes my rpi recognise the wake word but then get stucked. I have found that the service wm8960-soundcard.service failed to start and it looks it records the wake word once, then it crash.
the service log shows:

× wm8960-soundcard.service - WM8960 soundcard service
     Loaded: loaded (/etc/systemd/system/wm8960-soundcard.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Fri 2024-10-18 22:33:40 CEST; 3s ago
    Process: 1891 ExecStart=/usr/bin/wm8960-soundcard (code=exited, status=99)
   Main PID: 1891 (code=exited, status=99)
        CPU: 242ms

Oct 18 22:33:38 assistant systemd[1]: Starting wm8960-soundcard.service - WM8960 soundcard service...
Oct 18 22:33:38 assistant wm8960-soundcard[1891]: + exec
Oct 18 22:33:38 assistant wm8960-soundcard[1892]: ++ basename /usr/bin/wm8960-soundcard
Oct 18 22:33:40 assistant systemd[1]: wm8960-soundcard.service: Main process exited, code=exited, status=99/n/a
Oct 18 22:33:40 assistant systemd[1]: wm8960-soundcard.service: Failed with result 'exit-code'.
Oct 18 22:33:40 assistant systemd[1]: Failed to start wm8960-soundcard.service - WM8960 soundcard service.

I am not sure if I’ve done something wrong, at the moment I think there’s nothing to do with HA yet.
Someone have advice about how to deal with this problem?

Later this eveving I can post the wyoming service config.

I had a read of the repo you provided and the first thing I noticed was that it is recommended to manually build the application. Did you do that?
The other thing I noticed was that there are a few open issues that describe an issue with the application exiting prematurely. I suggest reading through the open and closed issues and see if there are any tips that get you going. The last advice I can give is to open your own issue for the developer to review and possibly comment on. Let us know how you make out.

1 Like

@pcwii thank you for the reply, I am not a programmer, this is just my hobby. I have double checked all the issues and it seems there are very similar opened, I will try to find a workaround, or carry on with Wyoming satellite and the integration on HA if the sound card service is not “essential”, since I could aplay and arecord.
I will update this.

Could you please help me or share the config?
I am stucked here:

Nov 08 08:56:46 assistant run[3769]: INFO:root:Ready
Nov 08 08:56:46 assistant run[3769]: DEBUG:root:Detected IP: 20.20.1.12
Nov 08 08:56:46 assistant run[3769]: DEBUG:root:Zeroconf discovery enabled (name=dca6328950b2, host=None)
Nov 08 08:56:46 assistant run[3769]: DEBUG:root:Connecting to mic service: ['arecord', '-D', 'plughw:CARD=seeed2micvoicec,DEV=0', '-q', '-r', '16000', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
Nov 08 08:56:46 assistant run[3769]: DEBUG:root:Connecting to snd service: ['aplay', '-D', 'plughw:CARD=seeed2micvoicec,DEV=0', '-q', '-r', '22050', '-c', '1', '-f', 'S16_LE', '-t', 'raw']
Nov 08 08:56:46 assistant run[3769]: DEBUG:root:Connecting to wake service: tcp://127.0.0.1:10400
Nov 08 08:56:46 assistant run[3769]: INFO:root:Connected to services
Nov 08 08:56:46 assistant run[3769]: DEBUG:root:Using webrtc audio enhancements
Nov 08 08:56:46 assistant run[3769]: DEBUG:root:Connected to mic service
Nov 08 08:56:46 assistant run[3769]: DEBUG:root:Connected to wake service
Nov 08 08:56:58 assistant run[3769]: DEBUG:root:Server set: 70639530781646
Nov 08 08:56:58 assistant run[3769]: INFO:root:Connected to server
Nov 08 08:56:58 assistant run[3769]: DEBUG:root:Running ['examples/commands/streaming_stop.sh']
Nov 08 08:56:58 assistant run[3783]: Audio streaming to server has stopped
Nov 08 08:56:58 assistant run[3769]: INFO:root:Waiting for wake word
Nov 08 08:56:58 assistant run[3769]: DEBUG:root:Started recording to /home/hass/wyoming-satellite/local/debug-recording/70639535185675-wake.wav
Nov 08 08:57:00 assistant run[3769]: DEBUG:root:Ping enabled
Nov 08 08:58:39 assistant run[3769]: DEBUG:root:Stopped recording to /home/hass/wyoming-satellite/local/debug-recording/70639535185675-wake.wav
Nov 08 08:58:39 assistant run[3769]: DEBUG:root:Started recording to /home/hass/wyoming-satellite/local/debug-recording/70639535185675-stt.wav
Nov 08 08:58:39 assistant run[3769]: DEBUG:root:Detection(name='ok_nabu_v0.1', timestamp=70740442340518, speaker=None)
Nov 08 08:58:39 assistant run[3769]: DEBUG:root:Streaming audio
Nov 08 08:58:39 assistant run[3769]: DEBUG:root:Event(type='run-pipeline', data={'start_stage': 'asr', 'end_stage': 'tts', 'restart_on_end': False, 'snd_format': {'rate': 22050, 'width': 2, 'channels': 1}}, payload=None)
Nov 08 08:58:39 assistant run[3769]: DEBUG:root:Running ['examples/commands/detection.sh']
Nov 08 08:58:39 assistant run[3789]: Wake word detected: ok_nabu_v0.1
Nov 08 08:58:39 assistant run[3769]: DEBUG:root:Muting microphone for 0.8995918367346939 second(s)
Nov 08 08:58:39 assistant run[3769]: DEBUG:root:Running ['examples/commands/streaming_start.sh']
Nov 08 08:58:39 assistant run[3792]: Audio streaming to server has started
Nov 08 08:58:39 assistant run[3769]: DEBUG:root:Connected to snd service
Nov 08 08:58:40 assistant run[3769]: DEBUG:root:Unmuted microphone

my config:

[Unit]
Description=Wyoming Satellite
Wants=network-online.target
After=network-online.target
Requires=wyoming-wakeword.service

[Service]
Type=simple
User=hass
Environment=XDG_RUNTIME_DIR=/run/user/1000
ExecStart=/home/hass/wyoming-satellite/script/run \
    --name 'Assist' \
    --uri 'tcp://0.0.0.0:10700' \
    --mic-command 'arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -q -r 16000 -c 1 -f S16_LE -t raw' \
    --snd-command 'aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -q -r 22050 -c 1 -f S16_LE -t raw' \
    --awake-wav '/home/hass/wyoming-satellite/sounds/awake.wav' \
    --done-wav '/home/hass/wyoming-satellite/sounds/done.wav' \
    --timer-finished-wav '/home/hass/wyoming-satellite/sounds/done.wav' \
    --mic-noise-suppression 2 \
    --mic-auto-gain 5 \
    --wake-uri 'tcp://127.0.0.1:10400' \
    --wake-word-name 'ok_nabu' \
    --debug \
    --debug-recording-dir '/home/hass/wyoming-satellite/local/debug-recording' \
#    --mic-seconds-to-mute-after-awake-wav 0.1 \
    --wake-refractory-seconds 10 \
    --tts-stop-command 'true' \
    --detection-command 'examples/commands/detection.sh' \
    --startup-command 'examples/commands/startup.sh' \
    --streaming-start-command 'examples/commands/streaming_start.sh' \
    --streaming-stop-command 'examples/commands/streaming_stop.sh' \
    --synthesize-command 'examples/commands/synthesize.sh' \
    --stt-start-command 'examples/commands/stt_start.sh' \
    --stt-stop-command 'examples/commands/stt_stop.sh' \
    --tts-start-command 'examples/commands/tts_start.sh' \
    --tts-stop-command 'examples/commands/tts_stop.sh'
#    --event-uri tcp://127.0.0.1:10500 
WorkingDirectory=/home/hass/wyoming-satellite
Restart=always
RestartSec=1

[Install]
WantedBy=default.target

Even if on the satellite there is the degub message “Audio streaming to server has started” in HA I still cant see the “assist in progress”… (but the mute button is working)

I made my own personal Voice Assistant using the Wyoming Protocol with Pi Zero 2W and a ReSpeaker 2Mic HAT for use with Home Assistant.

It’s got on-device wakeword, volume ducking, multi-room audio support using snapcast, tts. I used an old beats pill as the audio output which sounds way better than the cheaper DIY options!

I have made an in-depth step-by-step tutorial if anyone’s interested in making their own.

You can check it out GitHub - sayam93/Pi-Voice-Assistant

2 Likes

Hello, I ran into this nice project on YT and basically led me here. I have a PI 5 laying around and also the ReSpeaker 2-mic Pi Hat, and I followed the instructions from the GitHub for the Wyoming Satellite driver and all of the dependencies, but for some reason my PI 5 does not want to capture and run a record test.wav. I also used ChatGTP to assist me in this process and took me on a wild-loop with nothing resolved. My question is, is this project only compatible with PI W? Thanks for any feedback!

I’ve it running on a Pi 3 B however I used a separate mic and speaker using this install process. Try this thread to see if it helps resolve the issues: https://github.com/HinTak/seeed-voicecard/issues/19