rhasspy / wyoming-satellite

Remote voice satellite using Wyoming protocol
MIT License
614 stars 91 forks source link

Waking up without wakeword #145

Open malballuk1 opened 6 months ago

malballuk1 commented 6 months ago

I have found that the satellite wakes without the wake word, sometimes in a quiet room other times when the tv is on.

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

[Service] Type=simple ExecStart=/home/livingroomsatellite/wyoming-satellite/script/run \ --name 'Living Room Satellite' \ --uri 'tcp://0.0.0.0:10700' \ --mic-command 'parecord --property=media.role=phone --rate=16000 --channels=1 --format=s16le --r> --snd-command 'paplay --property=media.role=announce --rate=44100 --channels=1 --format=s16le --> --snd-command-rate 44100 \ --snd-volume-multiplier 0.3 \ --mic-auto-gain 5 \ --mic-noise-suppression 2 \ --wake-uri 'tcp://127.0.0.1:10400' \ --wake-word-name 'hey_jarvis' \ --event-uri 'tcp://127.0.0.1:10500' \ --awake-wav sounds/awake.wav \ --done-wav sounds/done.wav \ --detection-command '/home/livingroomsatellite/wyoming-enhancements/snapcast/scripts/awake.sh' \ --tts-stop-command '/home/livingroomsatellite/wyoming-enhancements/snapcast/scripts/done.sh' \ --debug WorkingDirectory=/home/livingroomsatellite/wyoming-satellite Restart=always RestartSec=1

[Install] WantedBy=default.target

Debug Mar 28 13:16:39 livingroomsatellite run[732]: INFO:root:Waiting for wake word Mar 28 14:26:43 livingroomsatellite run[732]: DEBUG:root:Detection(name='hey_jarvis_v0.1', timestamp=5815028140887) Mar 28 14:26:43 livingroomsatellite run[732]: DEBUG:root:Streaming audio Mar 28 14:26:43 livingroomsatellite run[732]: DEBUG:root:Event(type='run-pipeline', data={'start_stage': 'asr', 'end_stage': 'tts', 'restart_on_end': False, 'snd_format': {'rate': 44100, 'width': 2, 'channels': 1}}, payload=None) Mar 28 14:26:43 livingroomsatellite run[732]: DEBUG:root:Running ['/home/livingroomsatellite/wyoming-enhancements/snapcast/scripts/awake.sh'] Mar 28 14:26:43 livingroomsatellite run[1759]: Thu 28 Mar 14:26:43 GMT 2024 [awake.sh] ...Starting awake.sh script Mar 28 14:26:43 livingroomsatellite run[1759]: Thu 28 Mar 14:26:43 GMT 2024 [awake.sh] ...Starting silence Mar 28 14:26:43 livingroomsatellite run[732]: DEBUG:root:Muting microphone for 0.8995918367346939 second(s) Mar 28 14:26:44 livingroomsatellite run[732]: DEBUG:root:Connected to snd service Mar 28 14:26:44 livingroomsatellite run[732]: DEBUG:root:Unmuted microphone Mar 28 14:26:57 livingroomsatellite run[732]: WARNING:root:Event(type='error', data={'text': 'No text recognized', 'code': 'stt-no-text-recognized'}, payload=None) Mar 28 14:26:57 livingroomsatellite run[732]: INFO:root:Waiting for wake word

I also notice it just flashing the green lights without any interaction at all (not rebooting) Mar 28 14:26:57 livingroomsatellite run[732]: INFO:root:Waiting for wake word Mar 28 14:42:28 livingroomsatellite run[732]: WARNING:root:Did not receive ping response within timeout Mar 28 14:42:28 livingroomsatellite run[732]: DEBUG:root:Server disconnected Mar 28 14:42:28 livingroomsatellite run[732]: INFO:root:Disconnected from server Mar 28 14:42:28 livingroomsatellite run[732]: DEBUG:root:Server set: 30163795925 Mar 28 14:42:28 livingroomsatellite run[732]: INFO:root:Connected to server Mar 28 14:42:28 livingroomsatellite run[732]: DEBUG:root:Ping enabled Mar 28 14:42:31 livingroomsatellite run[732]: DEBUG:root:Server disconnected Mar 28 14:42:31 livingroomsatellite run[732]: INFO:root:Disconnected from server Mar 28 14:42:31 livingroomsatellite run[732]: DEBUG:root:Server set: 6763448198337 Mar 28 14:42:31 livingroomsatellite run[732]: INFO:root:Connected to server Mar 28 14:42:31 livingroomsatellite run[732]: INFO:root:Waiting for wake word Mar 28 14:42:33 livingroomsatellite run[732]: DEBUG:root:Ping enabled

ra31el71 commented 6 months ago

Mine has the same problem! Very annoying.

tannisroot commented 6 months ago

The LEDs flash because they do that when the satellite connects to Home Assistant, and it seems from your logs that it keeps losing connection to it. This could be due to Home Assistant restarting, or bad wi-fi connection on the Pi.

m-abs commented 5 months ago

I experience the same thing. It's really creepy at 3:30 in the morning while I'm sleeping and suddenly the Jabra 410 speaker makes the activation noise and after a short while says "Beklager, det forstod jeg ikke" (Danish for "Sorry, I couldn't understand that").

tannisroot commented 5 months ago

I experience the same thing. It's really creepy at 3:30 in the morning while I'm sleeping and suddenly the Jabra 410 speaker makes the activation noise and after a short while says "Beklager, det forstod jeg ikke" (Danish for "Sorry, I couldn't understand that").

Could you please provide logs from the time that this happened?

tannisroot commented 5 months ago

Anyway, assuming it's just a false positive, you can raise the threshold at which wyoming-satellite will trigger at using the --threshold option, which is set to 0.5 by default. I'm actully encountering an issue where the wakeword is not being triggered consistently, so in my service unit I set it to like, 0.01. If you want it to trigger less, you might want trying setting it to idk, 0.6, 0.75?

[Unit]
Description=Wyoming openWakeWord

[Service]
Type=simple
ExecStart=/home/pi/wyoming-openwakeword/script/run \
    --uri 'tcp://127.0.0.1:10400' \
    --threshold 0.01 \
    --preload-model 'ok_nabu'
WorkingDirectory=/home/pi/wyoming-openwakeword
Restart=always
RestartSec=1

[Install]
WantedBy=default.target
m-abs commented 5 months ago

Could you please provide logs from the time that this happened?

Not much to see in the logs.

From wyoming-satellite.service:

Apr 12 03:15:19 raspberrypi run[1181]: INFO:root:Waiting for wake word
Apr 12 03:15:19 raspberrypi run[1181]: DEBUG:root:Connected to snd service
Apr 12 03:15:19 raspberrypi run[1181]: DEBUG:root:Event(type='synthesize', data={'text': 'Undskyld, det forstod jeg ikk>
Apr 12 03:15:20 raspberrypi run[1181]: DEBUG:root:Connected to snd service
Apr 12 04:45:44 raspberrypi run[1181]: DEBUG:root:Detection(name='hey_kitt', timestamp=16345880838612)
Apr 12 04:45:44 raspberrypi run[1181]: DEBUG:root:Streaming audio
Apr 12 04:45:44 raspberrypi run[1181]: DEBUG:root:Event(type='run-pipeline', data={'start_stage': 'asr', 'end_stage': '>
Apr 12 04:45:44 raspberrypi run[1181]: DEBUG:root:Muting microphone for 0.8995918367346939 second(s)
Apr 12 04:45:44 raspberrypi run[1181]: DEBUG:root:Connected to snd service
Apr 12 04:45:45 raspberrypi run[1181]: DEBUG:root:Unmuted microphone
Apr 12 04:46:01 raspberrypi run[1181]: DEBUG:root:Event(type='transcript', data={'text': ' Tak.\n'}, payload=None)

From wyoming-wakeword.service

Apr 12 03:15:02 raspberrypi run[801]: DEBUG:root:Triggered hey_kitt (client=21483160152)
Apr 12 03:58:40 raspberrypi run[801]: DEBUG:wyoming_openwakeword.handler:Sent info to client: 21483160152
Apr 12 04:45:44 raspberrypi run[801]: DEBUG:root:Triggered hey_kitt (client=21483160152)
Apr 12 04:54:55 raspberrypi run[801]: DEBUG:wyoming_openwakeword.handler:Sent info to client: 21483160152
m-abs commented 5 months ago

Anyway, assuming it's just a false positive, you can raise the threshold at which wyoming-satellite will trigger at using the --threshold option, which is set to 0.5 by default.

I have tried increasing to 0.65, I hope it fixes the issue. Thank you.

malballuk1 commented 5 months ago

I have also tried increasing the threshold and will see if that makes a difference, however, I don't think that helps with it waking up without the wakeword

m-abs commented 5 months ago

It didn't solve the problem, it just triggered without me saying anything, but there is a lot of traffic noise from the street.

Of course it might be a problem with the hey_kitt-model. I couldn't get ok_nabu to trigger with my accent, so I settled on a custom model hey_kitt from home-assistant-wakewords-collection.

Apr 12 10:01:12 raspberrypi run[2888]: DEBUG:root:client=34487498369254, wake_word=hey_kitt, probability=0.7394803166389465

debdalerichard commented 5 months ago

It didn't solve the problem, it just triggered without me saying anything, but there is a lot of traffic noise from the street.

Of course it might be a problem with the hey_kitt-model. I couldn't get ok_nabu to trigger with my accent, so I settled on a custom model hey_kitt from home-assistant-wakewords-collection.

Apr 12 10:01:12 raspberrypi run[2888]: DEBUG:root:client=34487498369254, wake_word=hey_kitt, probability=0.7394803166389465

Hi..could you please explain where we copy the .tflite file so to change the wake word...cheers!

tannisroot commented 5 months ago

It didn't solve the problem, it just triggered without me saying anything, but there is a lot of traffic noise from the street. Of course it might be a problem with the hey_kitt-model. I couldn't get ok_nabu to trigger with my accent, so I settled on a custom model hey_kitt from home-assistant-wakewords-collection.

Apr 12 10:01:12 raspberrypi run[2888]: DEBUG:root:client=34487498369254, wake_word=hey_kitt, probability=0.7394803166389465

Hi..could you please explain where we copy the .tflite file so to change the wake word...cheers!

Please don't ask for support here, instead ask on Home Assistant discord or on Forums. Thanks.

wsieber commented 5 months ago

Mine respond to nothing also; that is to say they respond or repeat an error message randomly, with no prompt. I will upload logs.

Willie

LiveForToday commented 4 months ago

I had the same issue. My resolution was to train my own wake word. I let it train for way over the "standard" in the instructions. I tried several different times but in the end I had to really train the heck out of it for Jarvis to stop responding to almost everything and also silence. I think it trained for a good 5 hours but ymmv. Also when you use your own wake word it needs to have a tflite extension like this. I thought mine was working but it was getting triggered just as often. In the end this is how I got mine working. jarvis_v0.1.tflite in dir: ~/wyoming-satellite/local/wyoming-openwakeword/wyoming_openwakeword/models/jarvis_v0.1.tflite. Hope this helps someone.

To be clear that is not the name of my file in the \homeassistant.local\share\openwakeword folder. There it IS just jarvis.tflite

tolnai commented 4 months ago

I have the same problem (with the jarvis model), it waking up even when we are in dead silence, and there is not even background noise. I tried increasing the sensitivity even to 0.7, but it didn't change anything. My wake up sound is it saying "Yes?", so it's funny when it hits right into a conversation (hey, Jarvis thinks the same way!), but otherwise soooo annoying. :( I can't see anything relevant from those times in the logs. I guess I have to train my own wakeword...

Panplumousse commented 4 months ago

I had the same issue. My resolution was to train my own wake word. I let it train for way over the "standard" in the instructions. I tried several different times but in the end I had to really train the heck out of it for Jarvis to stop responding to almost everything and also silence. I think it trained for a good 5 hours but ymmv. Also when you use your own wake word it needs to have a tflite extension like this. I thought mine was working but it was getting triggered just as often. In the end this is how I got mine working. jarvis_v0.1.tflite in dir: ~/wyoming-satellite/local/wyoming-openwakeword/wyoming_openwakeword/models/jarvis_v0.1.tflite. Hope this helps someone.

To be clear that is not the name of my file in the \homeassistant.local\share\openwakeword folder. There it IS just jarvis.tflite

Hello, What you mean by train 5 hours ?

LiveForToday commented 4 months ago

I had the same issue. My resolution was to train my own wake word. I let it train for way over the "standard" in the instructions. I tried several different times but in the end I had to really train the heck out of it for Jarvis to stop responding to almost everything and also silence. I think it trained for a good 5 hours but ymmv. Also when you use your own wake word it needs to have a tflite extension like this. I thought mine was working but it was getting triggered just as often. In the end this is how I got mine working. jarvis_v0.1.tflite in dir: ~/wyoming-satellite/local/wyoming-openwakeword/wyoming_openwakeword/models/jarvis_v0.1.tflite. Hope this helps someone. To be clear that is not the name of my file in the \homeassistant.local\share\openwakeword folder. There it IS just jarvis.tflite

Hello, What you mean by train 5 hours ?


When you follow the instructions there is a point in which you can increase the sliders to improve the training. If you would just take a look at the instructions and follow the link you would see what I mean.

https://www.home-assistant.io/voice_control/create_wake_word/

This is what I adjusted to increase the reliability. It is not perfect of course but it is 80% better imo. wake word training

LazzaAU commented 1 month ago

Just trying to fine tune this same issue myself. I've set the threshold to 0.95 and will see how that goes. As a tip for other people also .... if you're using OpenAI conversation integration, try also adding something like If a request seems like it may be an accidental prompt, or makes no sense, do nothing and respond with "Opps sorry" to the OPenAi prompt in the integration. it stops her rambling on about not knowing what to do with your devices while your'e watching a movie :)