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.72k stars 228 forks source link

I installed Kalliope from source on Ubuntu 22.04 and I get error messages. It doesn't work. #682

Closed stman closed 1 year ago

stman commented 1 year ago

Hello.

I was so excited to use Kalliope, and my first try is a bit disappointing because it fails.

I am using a desktop computer, AMD64 based, with Ubuntu 22.04 installed on it.

I followed VERY CERAFULLY all the installation instructions from Kalliope website for Ubuntu 20.04, making the assumption that they are the same as for version 22.04.

The installation worked fine, but when downloading a French starter kit to test Kalliope, it doesn't work, there is a error inside some python code.

Here is the error displayed :

$ cd 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.10/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.10/imp.py", line 297, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'x86_64/python310/_snowboydetect'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/dist-packages/kalliope/signals/order/order.py", line 89, in run
    self.start_trigger()
  File "/usr/local/lib/python3.10/dist-packages/transitions/core.py", line 402, in trigger
    return self.machine._process(func)
  File "/usr/local/lib/python3.10/dist-packages/transitions/core.py", line 1223, in _process
    self._transition_queue[0]()
  File "/usr/local/lib/python3.10/dist-packages/transitions/core.py", line 416, in _trigger
    self._process(event_data)
  File "/usr/local/lib/python3.10/dist-packages/transitions/core.py", line 439, in _process
    if trans.execute(event_data):
  File "/usr/local/lib/python3.10/dist-packages/transitions/core.py", line 277, in execute
    self._change_state(event_data)
  File "/usr/local/lib/python3.10/dist-packages/transitions/core.py", line 287, in _change_state
    event_data.machine.get_state(self.dest).enter(event_data)
  File "/usr/local/lib/python3.10/dist-packages/transitions/core.py", line 129, in enter
    event_data.machine.callbacks(self.on_enter, event_data)
  File "/usr/local/lib/python3.10/dist-packages/transitions/core.py", line 1146, in callbacks
    self.callback(func, event_data)
  File "/usr/local/lib/python3.10/dist-packages/transitions/core.py", line 1167, in callback
    func(*event_data.args, **event_data.kwargs)
  File "/usr/local/lib/python3.10/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.10/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.10/dist-packages/kalliope/core/Utils/Utils.py", line 135, in get_dynamic_class_instantiation
    mod = __import__(package_path, fromlist=[module_name.capitalize()])
  File "/usr/local/lib/python3.10/dist-packages/kalliope/trigger/snowboy/__init__.py", line 1, in <module>
    from .snowboy import Snowboy
  File "/usr/local/lib/python3.10/dist-packages/kalliope/trigger/snowboy/snowboy.py", line 6, in <module>
    from kalliope.trigger.snowboy import snowboydecoder
  File "/usr/local/lib/python3.10/dist-packages/kalliope/trigger/snowboy/snowboydecoder.py", line 7, in <module>
    from . import snowboydetect
  File "/usr/local/lib/python3.10/dist-packages/kalliope/trigger/snowboy/snowboydetect.py", line 36, in <module>
    _snowboydetect = swig_import_helper()
  File "/usr/local/lib/python3.10/dist-packages/kalliope/trigger/snowboy/snowboydetect.py", line 28, in swig_import_helper
    import _snowboydetect
ModuleNotFoundError: No module named '_snowboydetect'
^C

Ctrl+C pressed. Killing Kalliope 

If somebody could give a hand on this issue to know what's wrong here ?

Thanks by advance.

Sispheor commented 1 year ago

Snowboy is deprecated. You can try the docker image. Some user compile the last available snowboy for their current python version. You can find some reference in issues.

corus87 commented 1 year ago

That's the problem, there is no compiled _snowboydetect for python3.10. You can either try to compile your own _snowboydetect , or you can use another trigger, like porcupine.

For the porcupine trigger, there where some major changes in the last year, but you should still be able to install the trigger and use the keywords in the folder keyword_files_v1.9.

I will update the porcupine trigger to the latest version when I got some time, then it is possible to create your own wake words.

stman commented 1 year ago

Thank you very much to both of you. Let me try your suggestions and I will be back here soon to tell how it went. I am very excited to be able to use Kalliope, that's a great free software project. Meybe the documentation should be updated to inform about this issue.

stman commented 1 year ago

Hello.

After a lot of insistance for a few hours, I was not able to compile the snowboydetect. It's too complicated, too many dependencies that I could not satisfy by any means, even trying to compile myself some of them.

On the other hand, I managed to compile/install Porcupine in about one hour of work, and change the relevant settings.yml file correctly and I could finaly launch Kalliope.

The french demo config template of brains I am using worked well, but the whole thing is very slow to react/analyze on a recent fast 8 cores AMD based computer : At this level, I must say that I am disappointed.

Thank you very much for your help, this thread can be closed.

Kind regards,

Frederic