kalliope-project / kalliope

Kalliope is a framework that will help you to create your own personal assistant.
https://kalliope-project.github.io/
GNU General Public License v3.0
1.71k stars 229 forks source link

Fatal error for module Snowboydetect #673

Closed dairne closed 2 years ago

dairne commented 2 years ago

The error : `pi@raspberrypi:~/kalliope_starter_fr $ kalliope --version Kalliope 0.7.1 pi@raspberrypi:~/kalliope_starter_fr $ python --version Python 3.9.2 pi@raspberrypi:~/kalliope_starter_fr $ kalliope start Starting REST API Listening port: 5000 Starting Kalliope Press Ctrl+C for stopping Starting order signal Exception in thread <class 'kalliope.signals.order.order.Order'>: Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/kalliope/trigger/snowboy/snowboydetect.py", line 26, in swig_import_helper fp, pathname, description = imp.find_module(module_file_path, [dirname(file)]) File "/usr/lib/python3.9/imp.py", line 296, in find_module raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named 'armv7l/python39/_snowboydetect'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner self.run() File "/usr/local/lib/python3.9/dist-packages/kalliope/signals/order/order.py", line 89, in run self.start_trigger() File "/usr/local/lib/python3.9/dist-packages/transitions/core.py", line 401, in trigger return self.machine._process(func) File "/usr/local/lib/python3.9/dist-packages/transitions/core.py", line 1201, in _process self._transition_queue[0]() File "/usr/local/lib/python3.9/dist-packages/transitions/core.py", line 426, in _trigger return self._process(event_data) File "/usr/local/lib/python3.9/dist-packages/transitions/core.py", line 435, in _process if trans.execute(event_data): File "/usr/local/lib/python3.9/dist-packages/transitions/core.py", line 276, in execute self._change_state(event_data) File "/usr/local/lib/python3.9/dist-packages/transitions/core.py", line 286, in _change_state event_data.machine.get_state(self.dest).enter(event_data) File "/usr/local/lib/python3.9/dist-packages/transitions/core.py", line 128, in enter event_data.machine.callbacks(self.on_enter, event_data) File "/usr/local/lib/python3.9/dist-packages/transitions/core.py", line 1123, in callbacks self.callback(func, event_data) File "/usr/local/lib/python3.9/dist-packages/transitions/core.py", line 1144, in callback func(*event_data.args, **event_data.kwargs) File "/usr/local/lib/python3.9/dist-packages/kalliope/signals/order/order.py", line 96, in start_trigger_process self.trigger_instance = TriggerLauncher.get_trigger(settings=self.settings, callback=self.trigger_callback) File "/usr/local/lib/python3.9/dist-packages/kalliope/core/TriggerLauncher.py", line 32, in get_trigger trigger_instance = Utils.get_dynamic_class_instantiation(package_name="trigger", File "/usr/local/lib/python3.9/dist-packages/kalliope/core/Utils/Utils.py", line 126, in get_dynamic_class_instantiation mod = import(package_path, fromlist=[module_name.capitalize()]) File "/usr/local/lib/python3.9/dist-packages/kalliope/trigger/snowboy/init.py", line 1, in from .snowboy import Snowboy File "/usr/local/lib/python3.9/dist-packages/kalliope/trigger/snowboy/snowboy.py", line 6, in from kalliope.trigger.snowboy import snowboydecoder File "/usr/local/lib/python3.9/dist-packages/kalliope/trigger/snowboy/snowboydecoder.py", line 7, in from . import snowboydetect File "/usr/local/lib/python3.9/dist-packages/kalliope/trigger/snowboy/snowboydetect.py", line 36, in _snowboydetect = swig_import_helper() File "/usr/local/lib/python3.9/dist-packages/kalliope/trigger/snowboy/snowboydetect.py", line 28, in swig_import_helper import _snowboydetect ModuleNotFoundError: No module named '_snowboydetect' `

I've read some related issues and now I know that the dev of Snowboy is stopped and anyway this module isn't supported by Python 3.7+ versions but theses issues are not really recent and with a fresh install of Raspberry OS Bullseye I'm actually on Python 3.9 so I'm kinda stuck.

Is there a way to have it working anyway ? An image for raspberry with all the modules needed with great version would be awesome but I didn't founded it.

And, sorry for my grammar, I'm French :) Thanks in advance!

Sispheor commented 2 years ago

Hi, We do not build RPi image anymore as it's complicated to cover all version/proc etc... Snowboy is indeed deprecated. And we havn't worked on a replacement. I heard that there is a fork. Not sure.

Maybe you'll have to try with another trigger word engine.

corus87 commented 2 years ago

The problem is Python3.9 we only provide a compiled _snowboydetect for python3.7. However you can try to compile your own wrapper for python3.9. Here is a fork of snowboy, where you can compile a python3.9 wrapper (only difference is, there is script to create your own wakeword). But not sure if everything else on kalliope will work with python3.9. I would recommend to install python3.7.

To create a new Keyword, I can recommend this docker image which worked for me out of the box.

elipothier commented 2 years ago

is this project still maintained?

Sispheor commented 2 years ago

Installation fixed in the last release.