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

Error - Wakeword install #170

Open
smartypants1138 opened this issue May 31, 2024 · 30 comments
Open

Error - Wakeword install #170

smartypants1138 opened this issue May 31, 2024 · 30 comments

Comments

@smartypants1138
Copy link

Hello -

I'm continually hitting this error at the Wakeword install step, see screenshot.

ERROR: Could not find a version that satisfies the requirement tflite-runtime-nightly (from versions: none)
ERROR: No matching distribution found for tflite-runtime-nightly
image

Thanks in advance for any advice!

@LiveForToday
Copy link

LiveForToday commented May 31, 2024

I ran into this. what worked for me was I ran an apt-get update, rebooted, then run python or python3 -m installer. make simple changes and apply it. then try and run the script/setup again. I believe this is what got me working. I had a lot of trial an error but this might work for you as well. Hopefully it will.

@tannisroot
Copy link
Contributor

Try following the instructions again but in the beginning, instead of flashing "Legacy" Raspberry Pi OS, select the same variant but the normal, latest non-legacy one. So something like "Raspberry Pi OS 64-bit Lite".

@tsx-5
Copy link

tsx-5 commented Jun 1, 2024

Did starting over and using a different OS solve the problem? I'm running into it as well...

@tannisroot
Copy link
Contributor

Did starting over and using a different OS solve the problem? I'm running into it as well...

It did for me. I having a Pi Zero 2W with a 2-Mic hat and everything works fine under non-legacy Pi OS.

@tsx-5
Copy link

tsx-5 commented Jun 2, 2024

Which version did you use? If I may ask...

@tannisroot
Copy link
Contributor

Which version did you use? If I may ask...

image

@tsx-5
Copy link

tsx-5 commented Jun 2, 2024

Thanks for that. Not sure what's going on - my attempts always causes the Pi to lockup when it's trying to create the drivers :-/

@tannisroot
Copy link
Contributor

Thanks for that. Not sure what's going on - my attempts always causes the Pi to lockup when it's trying to create the drivers :-/

What Pi model is it?

@tsx-5
Copy link

tsx-5 commented Jun 2, 2024

@smartypants1138
Copy link
Author

@tannisroot, thank you, I tried the non-legacy version and it locks up as @tsx-5 describes. I'm using Pi Zero 2W

@tannisroot
Copy link
Contributor

This is so weird. How can have the exact same hardware and not have this issue under the exact same OS?

@smartypants1138
Copy link
Author

Yeah, agreed! Really odd.

I found this and I was able to complete the install:

https://github.com/rhasspy/wyoming-satellite/issues/157#issuecomment-2067548218

@smartypants1138
Copy link
Author

I should also mention - I went back to the legacy RPi install and I do have wake word working, but no LED yet.

@tannisroot
Copy link
Contributor

Thanks for that. Not sure what's going on - my attempts always causes the Pi to lockup when it's trying to create the drivers :-/

What Pi model is it?

When you say creating drivers, do you mean when it compiles? Or when it tries to install them after compilation?
It's possible for whatever reason that the Pi is consuming more power during compile under bookworm, and due to a bad power supply it locks up.

@tsx-5
Copy link

tsx-5 commented Jun 3, 2024

I'm away from home, ATM, however I'm pretty sure it was trying to compile... Guess I'll have to find another power supply to test with.

@holgerb
Copy link

holgerb commented Jun 6, 2024

I got the same problem, used the legacy rpiOS and were not able to install the wakeword. Followed the hint to retry it using the "non legacy" lite version but then I got stuck during the driver compilation on:

Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.6.20+rpt-rpi-v8 -C /lib/modules/6.6.20+rpt-rpi-v8/build M=/var/lib/dkms/seeed-voicecard/0.3/build..

After running htop in parallel the zero got stuck when the swap was used about 99%.

Increasing the swap to 512mb following this guide solved it for me.

@tsx-5
Copy link

tsx-5 commented Jun 7, 2024

Thanks holgerb,

Increasing the swap allowed for everything to compile and move forward. That said, wakeword still seems to have an issue...


● wyoming-openwakeword.service - Wyoming openWakeWord
     Loaded: loaded (/etc/systemd/system/wyoming-openwakeword.service; disabled; preset: enabled)
     Active: active (running) since Fri 2024-06-07 18:16:37 EDT; 1min 11s ago
   Main PID: 883 (python3)
      Tasks: 9 (limit: 174)
        CPU: 5.604s
     CGroup: /system.slice/wyoming-openwakeword.service
             ├─883 python3 /home/bat-sat/wyoming-openwakeword/script/run --uri tcp://127.0.0.1:10400
             └─884 /home/bat-sat/wyoming-openwakeword/.venv/bin/python3 -m wyoming_openwakeword --uri tcp://127.0.0.1:10400

Jun 07 18:16:37 bat-sat systemd[1]: Started wyoming-openwakeword.service - Wyoming openWakeWord.
Jun 07 18:16:39 bat-sat run[884]: INFO:root:Ready
Jun 07 18:17:40 bat-sat run[884]: INFO: Created TensorFlow Lite XNNPACK delegate for CPU.

I'll highlight the disabled part of that (the icon shows green - even though it reports disabled). Anyone else seeing this?

More info...

bat-sat@bat-sat:~/wyoming-openwakeword/script $ ./run --uri 'tcp://127.0.0.1:10400'
/home/bat-sat/wyoming-openwakeword/.venv/bin/python3: No module named wyoming_openwakeword
Traceback (most recent call last):
  File "/home/bat-sat/wyoming-openwakeword/script/./run", line 12, in <module>
    subprocess.check_call([context.env_exe, "-m", "wyoming_openwakeword"] + sys.argv[1:])
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/bat-sat/wyoming-openwakeword/.venv/bin/python3', '-m', 'wyoming_openwakeword', '--uri', 'tcp://127.0.0.1:10400']' returned non-zero exit status 1.

running setup completes without any errors, but it seems I'm missing a module.

@tannisroot
Copy link
Contributor

Thanks holgerb,

Increasing the swap allowed for everything to compile and move forward. That said, wakeword still seems to have an issue...


● wyoming-openwakeword.service - Wyoming openWakeWord
     Loaded: loaded (/etc/systemd/system/wyoming-openwakeword.service; disabled; preset: enabled)
     Active: active (running) since Fri 2024-06-07 18:16:37 EDT; 1min 11s ago
   Main PID: 883 (python3)
      Tasks: 9 (limit: 174)
        CPU: 5.604s
     CGroup: /system.slice/wyoming-openwakeword.service
             ├─883 python3 /home/bat-sat/wyoming-openwakeword/script/run --uri tcp://127.0.0.1:10400
             └─884 /home/bat-sat/wyoming-openwakeword/.venv/bin/python3 -m wyoming_openwakeword --uri tcp://127.0.0.1:10400

Jun 07 18:16:37 bat-sat systemd[1]: Started wyoming-openwakeword.service - Wyoming openWakeWord.
Jun 07 18:16:39 bat-sat run[884]: INFO:root:Ready
Jun 07 18:17:40 bat-sat run[884]: INFO: Created TensorFlow Lite XNNPACK delegate for CPU.

I'll highlight the disabled part of that (the icon shows green - even though it reports disabled). Anyone else seeing this?

More info...

bat-sat@bat-sat:~/wyoming-openwakeword/script $ ./run --uri 'tcp://127.0.0.1:10400'
/home/bat-sat/wyoming-openwakeword/.venv/bin/python3: No module named wyoming_openwakeword
Traceback (most recent call last):
  File "/home/bat-sat/wyoming-openwakeword/script/./run", line 12, in <module>
    subprocess.check_call([context.env_exe, "-m", "wyoming_openwakeword"] + sys.argv[1:])
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/bat-sat/wyoming-openwakeword/.venv/bin/python3', '-m', 'wyoming_openwakeword', '--uri', 'tcp://127.0.0.1:10400']' returned non-zero exit status 1.

running setup completes without any errors, but it seems I'm missing a module.

You didn't specify the wakeword to load

@tannisroot
Copy link
Contributor

It's also not how you test run the the service, you need to use script/run and not ./run.

@tsx-5
Copy link

tsx-5 commented Jun 8, 2024

Hey tannisroot,

Thanks for replying, I ran that command in the script folder (sorry to not have noted that). I also tried it with the wakeword command, without any success. I did look at the video doing these steps and noted that "disabled" was on his output for openwakeword - so even further from knowing what the issue is.

@tannisroot
Copy link
Contributor

tannisroot commented Jun 8, 2024

Hey tannisroot,

Thanks for replying, I ran that command in the script folder (sorry to not have noted that). I also tried it with the wakeword command, without any success. I did look at the video doing these steps and noted that "disabled" was on his output for openwakeword - so even further from knowing what the issue is.

It's unlikely it's related to this issue in particular, but I would be glad to help further on Discord. Ping me on Home Assistant server, my nickname is the same as here.

@tannisroot
Copy link
Contributor

For people who are running into driver installation issues, could you please try following the instructions from docs, but instead of installing the mainline wyoming-satellite repo, which corresponds with the following command

git clone https://github.com/rhasspy/wyoming-satellite.git

you install my branch with some changes that should solve the issue?

git clone -b adjust_compile_threads https://github.com/tannisroot/wyoming-satellite.git

Please let me know how it goes and whether the drivers gets successfully installed or not.

@The-Blackstone
Copy link

For people who are running into driver installation issues, could you please try following the instructions from docs, but instead of installing the mainline wyoming-satellite repo, which corresponds with the following command

git clone https://github.com/rhasspy/wyoming-satellite.git

you install my branch with some changes that should solve the issue?

git clone -b adjust_compile_threads https://github.com/tannisroot/wyoming-satellite.git

Please let me know how it goes and whether the drivers gets successfully installed or not.

This has worked for me. I installed it on a Raspberry Pi Zero 2 W with ReSpeaker 2Mic HAT on the non-legacy Pi OS Lite.

I got no driver errors, and everything seems to be working correctly.

Thank you!

@tannisroot
Copy link
Contributor

For people who are running into driver installation issues, could you please try following the instructions from docs, but instead of installing the mainline wyoming-satellite repo, which corresponds with the following command

git clone https://github.com/rhasspy/wyoming-satellite.git

you install my branch with some changes that should solve the issue?

git clone -b adjust_compile_threads https://github.com/tannisroot/wyoming-satellite.git

Please let me know how it goes and whether the drivers gets successfully installed or not.

This has worked for me. I installed it on a Raspberry Pi Zero 2 W with ReSpeaker 2Mic HAT on the non-legacy Pi OS Lite.

I got no driver errors, and everything seems to be working correctly.

Thank you!

Thank you so much for testing!

@edekeijzer
Copy link

Thanks a lot for this, I now swap the SD card from my Zero 2W to a Pi 3B when it's kernel update time.

@galli-miranda
Copy link

Hi @tannisroot , thank you for helping! I have tested your branch with a raspberry pi zero 2 W and the LEgacy 64 Bit lite: No success. Same error as the others in the thread on installing Open Wake Word. What I'm not sure if others tried or not, the other wakeword systems installed and worked just fine.
Then I tested the 64 bit lite (non-legacy): Openwakeword installation worked! However, I am still struggling to get it to work. it is a USB conference speaker, not the respeaker 2mic hat, if that matters.
Weirdly enough, when running the local wake word detection with openwakeword it just never captures anything (despite successful install), while snowboy works.

Again, I appreciate the help so far! :)

@tannisroot
Copy link
Contributor

Hi @tannisroot , thank you for helping! I have tested your branch with a raspberry pi zero 2 W and the LEgacy 64 Bit lite: No success. Same error as the others in the thread on installing Open Wake Word. What I'm not sure if others tried or not, the other wakeword systems installed and worked just fine. Then I tested the 64 bit lite (non-legacy): Openwakeword installation worked! However, I am still struggling to get it to work. it is a USB conference speaker, not the respeaker 2mic hat, if that matters. Weirdly enough, when running the local wake word detection with openwakeword it just never captures anything (despite successful install), while snowboy works.

Again, I appreciate the help so far! :)

That's good, although my fix is aimed at fixing installation of drivers specifically for respeaker hat, if you have a USB conference speaker, you can use just the non-Legacy Raspberry Pi OS with the master branch.

@owingst
Copy link

owingst commented Jul 9, 2024

I tried the tannisroot wyoming installer on my pi zero 2W with Raspberry Pi OS Bookworm Lite 64-bit, but still get no sound from respeaker card. I have not gotten any respeaker or waveshare wm8960 sound cards to work on Pi Zero, but waveshare cards work on Pi4/P5 just fine. Any ideas?

pi@pi0:~ $ sudo systemctl status seeed-voicecard.service
● seeed-voicecard.service - Seeed Voicecard service
Loaded: loaded (/lib/systemd/system/seeed-voicecard.service; enabled; preset: enabled)
Active: active (exited) since Tue 2024-07-09 11:49:48 CDT; 2min 55s ago
Process: 1145 ExecStart=/usr/bin/seeed-voicecard (code=exited, status=0/SUCCESS)
Main PID: 1145 (code=exited, status=0/SUCCESS)
CPU: 505ms

Jul 09 11:49:48 pi0 seeed-voicecard[1184]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: No state is present for card vc4hdmi
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: Found hardware: "vc4-hdmi" "" "" "" ""
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: Hardware is initialized using a generic method
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: No state is present for card vc4hdmi
Jul 09 11:49:48 pi0 seeed-voicecard[1184]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
Jul 09 11:49:48 pi0 seeed-voicecard[1185]: + aplay -l
Jul 09 11:49:48 pi0 seeed-voicecard[1186]: + grep -q 'bcm2835 ALSA'
Jul 09 11:49:48 pi0 systemd[1]: Finished seeed-voicecard.service - Seeed Voicecard service.

@owingst
Copy link

owingst commented Jul 10, 2024

I was able to get sound from soundcard when I hooked up a speaker to jst connector. I have been using a speaker attached to audio jack and never got any sound. Thanks!

@tannisroot
Copy link
Contributor

I tried the tannisroot wyoming installer on my pi zero 2W with Raspberry Pi OS Bookworm Lite 64-bit, but still get no sound from respeaker card. I have not gotten any respeaker or waveshare wm8960 sound cards to work on Pi Zero, but waveshare cards work on Pi4/P5 just fine. Any ideas?

pi@pi0:~ $ sudo systemctl status seeed-voicecard.service ● seeed-voicecard.service - Seeed Voicecard service Loaded: loaded (/lib/systemd/system/seeed-voicecard.service; enabled; preset: enabled) Active: active (exited) since Tue 2024-07-09 11:49:48 CDT; 2min 55s ago Process: 1145 ExecStart=/usr/bin/seeed-voicecard (code=exited, status=0/SUCCESS) Main PID: 1145 (code=exited, status=0/SUCCESS) CPU: 505ms

Jul 09 11:49:48 pi0 seeed-voicecard[1184]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2 Jul 09 11:49:48 pi0 seeed-voicecard[1184]: No state is present for card vc4hdmi Jul 09 11:49:48 pi0 seeed-voicecard[1184]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2 Jul 09 11:49:48 pi0 seeed-voicecard[1184]: Found hardware: "vc4-hdmi" "" "" "" "" Jul 09 11:49:48 pi0 seeed-voicecard[1184]: Hardware is initialized using a generic method Jul 09 11:49:48 pi0 seeed-voicecard[1184]: No state is present for card vc4hdmi Jul 09 11:49:48 pi0 seeed-voicecard[1184]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2 Jul 09 11:49:48 pi0 seeed-voicecard[1185]: + aplay -l Jul 09 11:49:48 pi0 seeed-voicecard[1186]: + grep -q 'bcm2835 ALSA' Jul 09 11:49:48 pi0 systemd[1]: Finished seeed-voicecard.service - Seeed Voicecard service.

FYI my changed were merged and it's ok to use master now

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

9 participants