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

Have you tried changing the preload model to the wakeword?

Here is part of my service.

The more I look at this I think you might have combined / confused two services. There is the satellite service AND an open wake word service. It looks like your open wake word service has parts of both. Here is part of my satellite service for reference.

I couldndt get that method to work.
Upload your wake word to :
/home/yourusername/wyoming-openwakeword/wyoming_openwakeword/models
You have to name your wake word file differently. if its wall-e.tflite, you need to rename it to wall-e_v0.1.tflite
Then change it in the wyoming satellite config to just ā€œwall-eā€
Remove the custom directory line in your config. Youll just put the ā€œwall-eā€ as the wakeword name. Dont add the file extension.

Thanks @pcwii, this worked for me. !

Hi @Rich37804, I followed @pcwii guide and managed to get it working, and I didnā€™t have to change the files names.

1 Like

Hi, I installed my Wyoming Satellite per the tutorioal on their page and it was working perfectly, however then i saw the FutureProofHomes tutorial for the Enhanced Wyoming Satellite, and now i beleive pulse audio is doing some interference with the microphone and maybe speakers, has anyone had this issue?

Iā€™m using a RPi zero 2w with the 2mic HAT by snapseed, honestlly I dont know if maybe there is something that i missed in the configuration, because sometimes i can stream and use the assistant no prblem, but sometimes it just doesnt work at all like if it is not hearing or being able to output sound, even with paplay not working.

1 Like

i also have issues.

Just followed this method to a ā€˜Tā€™, and still have no sound output from the device when playing music, or using the voice wakeword command. Its listening, because when using the wakeword, the LEDā€™s light up, and the command is executed. However snapclient/snapcast music playback does not work, and the sound output does not work. The error i get is

Jul 07 09:59:04 wyoming pulseaudio[510]: Failed to open cookie file '/var/run/pulse/.pulse-cookie': No such file or directory
Jul 07 09:59:04 wyoming pulseaudio[510]: Failed to load authentication key '/var/run/pulse/.pulse-cookie': No such file or directory
Jul 07 09:59:04 wyoming systemd[1]: Started pulseaudio.service - PulseAudio system server.
Jul 07 09:59:07 wyoming pulseaudio[510]: Failed to find a working profile.
Jul 07 09:59:08 wyoming pulseaudio[510]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-3f902000.hdmi" card_name="alsa_card.platform-3f902000.hdmi" namereg_fail=false tsched=yes fixed_latency_range=no >
Jul 07 09:59:14 wyoming pulseaudio[510]: Failed to find a working profile.
Jul 07 09:59:14 wyoming pulseaudio[510]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-3f902000.hdmi" card_name="alsa_card.platform-3f902000.hdmi" namereg_fail=false tsched=yes fixed_latency_range=no >
Jul 07 09:59:14 wyoming pulseaudio[510]: ALSA woke us up to write new data to the device, but there was actually nothing to write.
Jul 07 09:59:14 wyoming pulseaudio[510]: Most likely this is a bug in the ALSA driver 'snd_bcm2835'. Please report this issue to the ALSA developers.
Jul 07 09:59:14 wyoming pulseaudio[510]: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.

But when using the command
paplay /usr/share/sounds/alsa/Front_Center.wav
the sound outputs fine. I ran the command
pactl set-default-sink alsa_output.platform-soc_sound.stereo-fallbackā€™
to set the output to the 2mic pi hat. Any ideas

Hi Chris,
On Step 4 of Futureproof Homes Snapcast installation, youll want to install the latest version of snapcast. His tutorial is out of date. Replace his step 4 with these:

cd wyoming-enhancements/snapcast/
wget https://github.com/badaix/snapcast/releases/download/v0.28.0/snapclient_0.28.0-1_armhf-bookworm.deb

sudo apt install ./snapclient_0.28.0-1_armhf-bookworm.deb

Im also assuming that you have built your Wyoming satellite with the newest versions in the 2 mic hat tutorial

3 Likes

Yeah i found that information in the github, and tried it a second time on a fresh setup of the satellite.
I still dont get sound output from the speaker. But, its specifically only when using the voice commands.
If i use paplay, and play a sound file, it plays fine from the speaker. Its only the voice commands, which tells me somehow the wyoming satellite service is not linking up with the pulse audio service.

Im not sure what you mean the newest versions in the 2 mic hat tutorial. I followed the tutorial found here

One thing I should add is that im trying this out on a raspberry pi 3b+. Before I get a pi 02W card.

1 Like

If you followed the tutorial recently, then you are good with that. It was updated in the past couple of weeks.
Did you leave Pulse Audio set to the speaker output? The FutureProofHomes tutorial has you set it to output through the 3.5mm connection.

Yeah, i did not run
pactl set-sink-port 1 ā€œanalog-output-headphonesā€

The sound outputs to the speaker fine when running paplay and playing a random sound file. It just doesnā€™t output when using snapcast from home assistant or when using the voice assistant.

If i stop the enhanced-wyoming-satellite.service and re run the wyoming-satellite.service, it works fine. Because the commands in that is aplay.

Also, parecord works fine too, because using the enhanced service, i can use the wakeworkd, the satellite wakes up, and listens, and executes my command. I just get no feedback to the speaker.

Thought id attach this too. It s the log from pulse audio.


Jul 10 16:35:36 wyoming pulseaudio[7336]: Running in system mode, but --disallow-exit not set.
Jul 10 16:35:36 wyoming pulseaudio[7336]: Running in system mode, but --disallow-module-loading not set.
Jul 10 16:35:36 wyoming pulseaudio[7336]: Home directory of user 'pulse' is not '/var/run/pulse', ignoring.
Jul 10 16:35:36 wyoming pulseaudio[7336]: OK, so you are running PA in system mode. Please make sure that you actually do want to do that.
Jul 10 16:35:36 wyoming pulseaudio[7336]: Please read http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/ for an explanation why system mode is usually a bad idea.
Jul 10 16:35:37 wyoming pulseaudio[7336]: Failed to find a working profile.
Jul 10 16:35:37 wyoming pulseaudio[7336]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-3f902000.hdmi" card_name="alsa_card.platform-3f902000.hdmi" namereg_fail=false tsched=yes fixed_latency_range=no>
Jul 10 16:35:39 wyoming pulseaudio[7336]: Failed to open cookie file '/var/run/pulse/.config/pulse/cookie': No such file or directory
Jul 10 16:35:39 wyoming pulseaudio[7336]: Failed to load authentication key '/var/run/pulse/.config/pulse/cookie': No such file or directory
Jul 10 16:35:39 wyoming pulseaudio[7336]: Failed to open cookie file '/var/run/pulse/.pulse-cookie': No such file or directory
Jul 10 16:35:39 wyoming pulseaudio[7336]: Failed to load authentication key '/var/run/pulse/.pulse-cookie': No such file or directory
Jul 10 16:36:32 wyoming pulseaudio[7336]: ALSA woke us up to write new data to the device, but there was actually nothing to write.
Jul 10 16:36:32 wyoming pulseaudio[7336]: Most likely this is a bug in the ALSA driver 'snd_bcm2835'. Please report this issue to the ALSA developers.
Jul 10 16:36:32 wyoming pulseaudio[7336]: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.

Your first 2 and last 3 lines of the Log do not appear in my properly functioning Satellite.

1 Like

Hallo world! I have tried this project and it worked! Thank you for that. I also have an Mic V2 Hat form amazon, but me pi zero 2 w donā€™t show it up. Is there a possibility to get the right drivers? Thanks!

Hello, can someone enlighten me on somehting?

I installed the wyoming-satellite on pc (arch btw).

But i noticed that the TTS response and awake sound and other sounds produced by satellite application works only if there is nothing playing in the background - youtube video music videoā€¦ if there is somehting playing then the satellite errors out on the TTS responsesā€¦

I have set up MPD (music player demon) and it can recieve TTS when some audio is playing in bgā€¦

I was wondering how can i send/bind satellite to send audio to MPD server?

Some of you had this line

--snd-command 'paplay --property=media.role=announce --rate=44100 --channels=1 --format=s16le --raw --latency-msec 10' \
    

The official example is like this:

  --snd-command 'aplay -r 22050 -c 1 -f S16_LE -t raw'

Im not smart about what it means but it has to do with the audio deviceā€¦ but my aplay -L doesnt have MPD as audio deviceā€¦ How do i set up the satellite to send audio to MPD?

Iā€™m just pipe all audio output to a smart speaker. Sonos works great, so does my Sony sound at. Add the below to the wyomiing-satellite service file

  --synthesize-command 'examples/commands/synthesize.sh'

Generate a token by going to the user icon at the bottom then security. Update the file above to. Now running all.voice output and music through it, Iā€™m not sure how that would work out. Since that script is defined in the service file Iā€™m not sure how one would create, say, a switch in HA to toggle it on/off. You would need to ssh and comment it out, restart daemon and service to disable it.

There is a way to do it with.a webhook but I donā€™t have telegram setup so API key was easier for me personally. You can also use piper instead of Nabu Casa cloud.

#!/usr/bin/env sh

text="$(cat)"
echo "Text to speech text: ${text}"

token='API_TOKEN'
echo "${token}"

curlData='{
  "entity_id": "media_player.vlc_telnet",
  "message": "'$text'"
}';
echo "$curlData" | jq '.'

curl \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $token" \
  -d "$curlData" \
  http://192.168.0.30:8123/api/services/tts/cloud_say

Iā€™m pretty positive the paplay is using pulse audio. If you just want to get the voice assistant working and are using a 2.mic respeaker then just copy and paste whatā€™s in the guide. You can try and get all the audio stuff done after you get the voice assistant working and in home assistant.

somehow i figured it out, i thinkā€¦ it was weeks agoā€¦ and no i dont use 2 mics, i have one PC and one mic. And i also figured out mpd. You had to run the MPD as a user service. Running as system service wont play nothing. Also there is slight delay from when you send the first sound to the mpd from HA, and it gets cut off, the second one sends fine and plays fullyā€¦ I havent figured this problem out yetā€¦

Speaking offā€¦ does anyone know how to train/STT model, to be small but precise? THere is whisper model that is small, loads fast and converts fast but its not precise. I want a model that is as fast but precise.

Maybe there is hardware that can do STT on the fly and is more precise that the whisper models?

Have you tried any of the other built in models? You can change the model size but depending on what hardware your running HA on, results will obviously vary. If you look at the whisper add-onā€™s configuration it defaults to tiny-8 which I believe is the smallest whisper model for the add on (you may know this already).

This thread also helped me find tune OpenWakeWord, way less false.positives.

I donā€™t believe you can train your own actual models I have a Seeed respeaker lite on the way, which has a XIOS chip in it for noise/echo cancelation and uses an ESP32-S3. It just doesnā€™t use ESP-ADF like the S3 box and leverages the XIOS to do all that. This should help STT but itā€™s to early to tell. Nabu Casa has also confirmed that their voice assistant will also have a XIOS chip also, but thatā€™s about all thatā€™s been said about it. The good thing is you know Nabuā€™s will just work to the best of its ability. Maybe not from the start but they will actually work on issues.

My best voice assistant, both distance and accuracy wise is a round USB speakerphone using the Assist Microphone add on. The obvious downside is it has to be plugged into your HA server directly and constantly streams for the wake word. My understanding is the DSP and other technology for noise/echo cancelation in the a speakerphone just works as itā€™s just built into the phone and plug and play with any computer, no drivers needed. You can also make it a VLC telnet hub/player so itā€™s like any casting device for music.

Still, if a TV is on or any audible voices it just doesnā€™t handle it well, none do in my experience (I have a Korvo-1 S3 model and 2 Wyoming satellites also). Wyoming beats the Korvo although all work pretty good with no background noise, particularly other human voices but the conference speakerphone still works best and super fast. The add on doesnā€™t have a ton of configuration options either which would be nice to have.

The hardest part is going to be voice isolation for STT IMO. I know both Google and Amazon have lost a lot of money (I think billions) on cloud resources for Alexa and Google Assistant. I imagine a lot of that is for voice isolation but obviously Iā€™m also assuming. They are both just remarkably good at isolating the voice that triggered it.

I have seen someone else mention Nabu Casa creating their own satellite and using an XIOS chip, but where is the source of this? Iā€™d like to stay up to date on what they are doing.