Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Satellite Reboots "Randomly" #199

Open
V1d1o7 opened this issue Jul 11, 2024 · 15 comments
Open

Satellite Reboots "Randomly" #199

V1d1o7 opened this issue Jul 11, 2024 · 15 comments

Comments

@V1d1o7
Copy link

V1d1o7 commented Jul 11, 2024

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:

  • Rpi0 2W
  • Respeaker 2mic
  • 3.5mm out (for now, switching to JST when the parts come in)

Logs:
journalctl output:

Service Files:

  • WY Sat
[Unit]
Description=Wyoming Satellite
Wants=network-online.target
After=network-online.target
Requires=wyoming-openwakeword.service
Requires=2mic_leds.service

[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
Copy link

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.

@V1d1o7
Copy link
Author

V1d1o7 commented Jul 14, 2024

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

@tannisroot
Copy link
Contributor

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

@twister36
Copy link

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
Copy link
Contributor

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

@V1d1o7
Copy link
Author

V1d1o7 commented Jul 21, 2024

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
Copy link
Contributor

Try insfalling tflite-runtime-nightly instead

@V1d1o7
Copy link
Author

V1d1o7 commented Jul 21, 2024

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

@V1d1o7
Copy link
Author

V1d1o7 commented Jul 21, 2024

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
Copy link

tflite

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

@twister36
Copy link

@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:
#32

@V1d1o7
Copy link
Author

V1d1o7 commented Jul 23, 2024

@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.

@V1d1o7
Copy link
Author

V1d1o7 commented Jul 25, 2024

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

@twister36
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants