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

None of the custom wake words are working. #217

Open
dreed47 opened this issue Sep 10, 2024 · 15 comments
Open

None of the custom wake words are working. #217

dreed47 opened this issue Sep 10, 2024 · 15 comments

Comments

@dreed47
Copy link

dreed47 commented Sep 10, 2024

described in this issue - #173

@tannisroot
Copy link
Contributor

tannisroot commented Sep 10, 2024

Please, if there is an existing issue, don't create a duplicate of it that is just a reference to it - keep discussion within the original issue.

@dreed47
Copy link
Author

dreed47 commented Sep 10, 2024

got it...but the only thing is the original issue title doesn't really describe the impact...that none of the custom wake words are working. Can you update the title of #173?

@tannisroot
Copy link
Contributor

I am neither the maintainer nor the author of the issue.
Can you provide your configuration for wyoming-satellite and wyoming-openwakeword from the .service files?

@dreed47
Copy link
Author

dreed47 commented Sep 10, 2024

Description=Wyoming Satellite
Wants=network-online.target
After=network-online.target
Requires=wyoming-openwakeword.service
Requires=2mic_leds.service

[Service]
Type=simple
Environment=HOSTNAME=%H
ExecStart=/opt/wyoming-satellite/script/run \
          --name '${HOSTNAME}' \
          --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 \
          --wake-uri 'tcp://127.0.0.1:10400' \
          --wake-word-name 'ok_nabu' \
          --event-uri 'tcp://127.0.0.1:10500' \
          --mic-seconds-to-mute-after-awake-wav 0.1 \
          --awake-wav '/opt/wyoming-satellite/sounds/awake.wav' \
          --done-wav '/opt/wyoming-satellite/sounds/done.wav' \
          --timer-finished-wav '/opt/wyoming-satellite/sounds/timer_finished.wav'
WorkingDirectory=/opt/wyoming-satellite
Restart=always
RestartSec=1
StandardOutput=file:/var/log/wyoming.log
StandardError=file:/var/log/wyoming.log

[Install]
WantedBy=default.target
Description=Wyoming openWakeWord

[Service]
Type=simple
ExecStart=/opt/wyoming-openwakeword/script/run \
         --uri 'tcp://127.0.0.1:10400' \
         --custom-model-dir '/opt/wakewords' 

WorkingDirectory=/opt/wyoming-openwakeword
Restart=always
RestartSec=1
StandardOutput=file:/var/log/wakeword.log
StandardError=file:/var/log/wakeword.log

[Install]
WantedBy=default.target

@tannisroot
Copy link
Contributor

--wake-word-name 'ok_nabu' \ is set to default ok_nabu wakeword, not your custom one. Also the openwakeword service doesn't preload the custom wakeword.

@dreed47
Copy link
Author

dreed47 commented Sep 10, 2024

I changed --wake-word-name back to the default because it was the only one I could get to work. When you say "he openwakeword service doesn't preload the custom wakeword." what does that mean? Is that a parameter?

@dreed47
Copy link
Author

dreed47 commented Sep 11, 2024

I changed my openwakeword service file to include the --preload-model directive and ran a few tests with custom wakewords and still has the same effect described in issue #173

[Unit]
Description=Wyoming openWakeWord

[Service]
Type=simple
ExecStart=/opt/wyoming-openwakeword/script/run \
         --uri 'tcp://127.0.0.1:10400' \
         --preload-model 'computer_v2' \
         --custom-model-dir '/opt/wakewords'


WorkingDirectory=/opt/wyoming-openwakeword
Restart=always
RestartSec=1
StandardOutput=file:/var/log/wakeword.log
StandardError=file:/var/log/wakeword.log

[Install]
WantedBy=default.target

@tannisroot
Copy link
Contributor

It wouldn't make a difference if the wakeword doesn't work properly in the first place.
Please provide systemctl status logs for both services when the custom wakeword is configured and after you've tried using it.

@dreed47
Copy link
Author

dreed47 commented Sep 11, 2024

The custom wakewords work...the first time. But eventually it does a wake WHILE its listening or trying to respond to the previous wake.

A systemctl status before and after shows me the same thing...see below. I tried running a journalctl -u <service_name> -f during and it produced no additional output. I have output sent to /var/log/wyoming.log and /var/log/wakeword.log and tailing those during the test produced no additional output. Not sure whats happening to my log records.

● wyoming-openwakeword.service - Wyoming openWakeWord
     Loaded: loaded (/etc/systemd/system/wyoming-openwakeword.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2024-09-11 13:00:29 EDT; 2min 16s ago
   Main PID: 2379 (python3)
      Tasks: 8 (limit: 191)
        CPU: 9.916s
     CGroup: /system.slice/wyoming-openwakeword.service
             ├─2379 python3 /opt/wyoming-openwakeword/script/run --uri tcp://127.0.0.1:10400 --custom-model-dir /opt/wakewords --preload-model computer_v1
             └─2382 /opt/wyoming-openwakeword/.venv/bin/python3 -m wyoming_openwakeword --uri tcp://127.0.0.1:10400 --custom-model-dir /opt/wakewords --pre>

Sep 11 13:00:29 voiceassist2 systemd[1]: Started Wyoming openWakeWord.

● wyoming-satellite.service - Wyoming Satellite
     Loaded: loaded (/etc/systemd/system/wyoming-satellite.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2024-09-11 13:00:29 EDT; 2min 16s ago
   Main PID: 2381 (python3)
      Tasks: 4 (limit: 191)
        CPU: 18.215s
     CGroup: /system.slice/wyoming-satellite.service
             ├─2381 python3 /opt/wyoming-satellite/script/run --name voiceassist2 --uri tcp://0.0.0.0:10700 --mic-command arecord -D plughw:CARD=seeed2micv>
             ├─2383 /opt/wyoming-satellite/.venv/bin/python3 -m wyoming_satellite --name voiceassist2 --uri tcp://0.0.0.0:10700 --mic-command arecord -D pl>
             └─2391 arecord -D plughw:CARD=seeed2micvoicec,DEV=0 -r 16000 -c 1 -f S16_LE -t raw

Sep 11 13:00:29 voiceassist2 systemd[1]: Started Wyoming Satellite.

@SvenSvenson38
Copy link

SvenSvenson38 commented Sep 12, 2024

I wonder if the gap below the directory is an issue? Also, I ultimately put the custom word in the same directory as the default wake words, and haven't had an issue using that at all. Below is my wake word service for reference.
Also, in the directory the model is titled to match the others, ie; 'hey_woodhouse_v0.1.tflite'


[Unit]
Description=Wyoming openWakeWord

[Service]
Type=simple
ExecStart=/home/voicesatellite/wyoming-openwakeword/script/run \
--uri 'tcp://127.0.0.1:10400' \
--preload-model 'hey_woodhouse' \
--custom-model-dir '/home/voicesatellite/wyoming-satellite/wyoming-openwakeword/wyoming_openwakeword/models/'
WorkingDirectory=/home/voicesatellite/wyoming-openwakeword
Restart=always
RestartSec=1

[Install]
WantedBy=default.target

@dreed47
Copy link
Author

dreed47 commented Sep 12, 2024

I've tried several variations including removing the spaces before the options. I also tried copying all the wake words to the default model folder. And I still see the same issue.

[Unit]
Description=Wyoming openWakeWord

[Service]
Type=simple
ExecStart=/opt/wyoming-openwakeword/script/run \
--uri 'tcp://127.0.0.1:10400' \
--custom-model-dir '/opt/wakewords' \
--preload-model 'hey_anna'
WorkingDirectory=/opt/wyoming-openwakeword
Restart=always
RestartSec=1
StandardOutput=file:/var/log/wakeword.log
StandardError=file:/var/log/wakeword.log

[Install]
WantedBy=default.target

@CBDesignS
Copy link

Not to rain on anyones parade but what I and quite a few others have noticed when using custom wake words is the device wakes and listens whenever it wants to, causing a lot of false detections. ( I am sure one of the Home Assistant Year of the Voice videos poss number 5 or 6 goes into the false detection problems and they are still trying to find out why it happens, I think they had it down to 1 false detection with the supplied voice but had 100s when using the custom detection) Nearly all the custom wake words are trainded with very little background noise and audio thru the automatic web page tool. The Custom wake word files are nearly all the same size because of this and I think they all share the same flaw that cause the false detections. I would suggest you get it working with the default voice wake words before you start with the custom wake words and may feel let down if you start getting loads of false wake word detections . I have an atom echo with hey jarvis and it wakes maybe once or twice a day by itself and I also have the satellite with my custom wake word and it wakes every 20-30 mins just sitting on the bench with no audio or noise in the room. I actually find it easire to control HA from my office alexa dot. it only wakes when I speak to it.

@dreed47
Copy link
Author

dreed47 commented Sep 13, 2024

The default wake word works fine and I understand your points about the custom wake words. It almost seems like it's detecting a wake word WHILE its responding to the previous request.

@CBDesignS
Copy link

I am positive one of the HA year of the voice videos dives into it but I have no idea if they have ever sorted it out, by the looks of the repo for the atom echo that has never been updated in over a month and has never had the fix pushed for the borked installer that points to the wrong file that leads to the little box entering a reboot loop. I suspect the devs are too busy with other things HA and this may be starting to head down the road to "Leave it to the end users to fix as it is not making us any money now" route of open source. We started and gave up so if you want it fixed then off you go.. It is a shame as it could be a good way to interact with HA as AI seems to be the buzz word at the moment. did you rename the custom wakeword with the correct extension name. it does not use the standard extension but uses a slightly different one.

@CBDesignS
Copy link

CBDesignS commented Sep 13, 2024

have you tried to copy the custom wakeword file to the /wyoming-openwakeword/wyoming_openwakeword/models/ folder
is the file called hey_anna.tflite ? if so you might need to change the name to hey_anna_v0.1.tflite..
Once I added the _v0.1 to my custom wake words they all started to work as best they can.

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

4 participants