rhasspy / wyoming-satellite

Remote voice satellite using Wyoming protocol
MIT License
568 stars 82 forks source link

Satellite Reboots "Randomly" #199

Open tdvantine opened 1 month ago

tdvantine commented 1 month ago

Got this installed and working well with a custom wake word (that documentation could use some love, perhaps a side project for later) but as I left it on the desk and started working on other projects i noticed it would restart the service periodically. The logs do give a pretty clear reason as to why, however I am not sure where to start with troubleshooting it and fixing it. Any help would be appreciated as this is by far one of the best setups I have seen.

Hardware:

Logs: journalctl output:

Service Files:

[Service] Type=simple ExecStart=/home/wyoming/wyoming-satellite/script/run \ --name 'TBR Satellite' --uri 'tcp://0.0.0.0:10700' \ --mic-command 'arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw' \ --snd-command 'aplay -D plughw:CARD=seeed2micvoicec,DEV=0 -r 22050 -c 1 -f S16_LE -t raw' \ --mic-auto-gain 5 --mic-noise-suppression 2 --snd-volume-multiplier 1.5 \ --wake-uri 'tcp://127.0.0.1:10400' --wake-word-name 'oi_faguette' \ --event-uri 'tcp://127.0.0.1:10500' --awake-wav /home/wyoming/wyoming-satellite/sounds/awake.wav WorkingDirectory=/home/wyoming/wyoming-satellite Restart=always RestartSec=1

[Install] WantedBy=default.target

- Open Wakeword

[Unit] Description=Wyoming openWakeWord

[Service] Type=simple ExecStart=/home/wyoming/wyoming-openwakeword/script/run --uri 'tcp://127.0.0.1:10400' WorkingDirectory=/home/wyoming/wyoming-openwakeword Restart=always RestartSec=1

[Install] WantedBy=default.target

twister36 commented 1 month ago

I also noticed this too... only because it's in my bedroom and I see the raspberry zero audio hat LEDs lighting up the bedroom. Following.

tdvantine commented 1 month ago

Did a fresh OS install and reinstalled everything, but still seeing the restart of the services.

tannisroot commented 1 month ago

What OS are you running and what is the version of tflite-runtime (-nightly)?

twister36 commented 1 month ago

For my setup: Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye Linux: 6.1.21-v8+

Where do you get the version of tflite??

tannisroot commented 1 month ago

Run wyoming-openwakeword/.venv/bin/pip3 list | grep tflite

tdvantine commented 1 month ago

apologies @tannisroot i didn't get an email or notification you had replied.

Operating System: Debian GNU/Linux 12 (bookworm)  
          Kernel: Linux 6.6.31+rpt-rpi-v8
    Architecture: arm64

and

tflite-runtime 2.14.0

tannisroot commented 1 month ago

Try insfalling tflite-runtime-nightly instead

tdvantine commented 1 month ago

Anything I need to do before installing, or will it over right the already installed one?

tdvantine commented 1 month ago

uninstalled tflite and installed the nightly mentioned. We now have a module error:

Jul 21 19:10:06 NY1-P-WYSAT-01 run[1814]: Traceback (most recent call last):
Jul 21 19:10:06 NY1-P-WYSAT-01 run[1814]:   File "/home/wyoming/wyoming-openwakeword/wyoming_openwakeword/openwakeword.py", line 9, in <module>
Jul 21 19:10:06 NY1-P-WYSAT-01 run[1814]:     import tflite_runtime.interpreter as tflite
Jul 21 19:10:06 NY1-P-WYSAT-01 run[1814]: ModuleNotFoundError: No module named 'tflite_runtime'
twister36 commented 1 month ago

tflite

For me "tflite" isn't even an install package on my system.

twister36 commented 1 month ago

@tdvantine - question, are you running the audio ducking? It's the function that lowers music that playing on your satellite when you call the wake-word and give a command. Then it will return the music after.

I found this issue where they are mentioning that this is a 'hack' and it may be the reason why the satellite is restarting. I looked at my satellite service and I do see that it's killing the pulseaudio client.

Jul 22 20:38:39 pi-satellite-bedroom4 run[175168]: Mon 22 Jul 20:38:39 MDT 2024 [done.sh] ...Killing silence pulseaudio client

Here is the link to the other thread: https://github.com/rhasspy/wyoming-satellite/issues/32

tdvantine commented 1 month ago

@twister36 negative, currently the only thing running is this software with the aforementioned set up. Figured there was no point in installing other software until this one worked since it was the main reason for the project.

tdvantine commented 1 month ago

I will try to install an older version of tflite to see if that changes anything, but that wont be until later tonight.

twister36 commented 3 weeks ago

So I indirectly found a possible solution. I have my satellite configured with with snapcast client so that i can send back TTS streams and I noticed that it was very flakey in audio quality. Researching this problem I identified that the cause for poor audio was poor wifi signal. I added a USB to Ethernet adapter to improve the network quality, which solved my audio issues with snapcast... but I've also noticed that my satellite is no longer randomly rebooting as well.

twister36 commented 1 week ago

Another update. I ended up disabling the wifi adapter, as it would still attempt to use it. Everything has been stable since moving to NIC.