Unclear on Matrix Core vs HAL for Rhasspy and assistant.js

I have Rhasspy (Docker) running on a Matrix Voice. My base install is Matrix Core with Python as a default package.

I would like to now enable assistant.js to detect the wake word and adjust the lights/everloop.

The guide for this is a bit different (https://www.hackster.io/matrix-labs/adding-intents-for-rhasspy-offline-voice-assistant-faa221). This uses Matrix HAL + Matrix Lite.

Questions I have:

  1. Can I try to just use the CORE setup I have and add the necessary JS components? I did try to follow this guide (https://matrix-io.github.io/matrix-documentation/matrix-core/getting-started/javascript-installation/) But end up with an error on the “npm install zeromq --save” step.

Building libzmq…
/home/pi/js-matrix-core-app/node_modules/zeromq/build/Release/…/…/script/build.sh: 60: /home/pi/js-matrix-core-app/node_modules/zeromq/build/Release/…/…/script/build.sh: cmake: not found
make: *** [libzmq.target.mk:13: libzmq/lib] Error 127
make: Leaving directory ‘/home/pi/js-matrix-core-app/node_modules/zeromq/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/pi/.nvm/versions/node/v8.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 5.4.51-v7l+
gyp ERR! command “/home/pi/.nvm/versions/node/v8.6.0/bin/node” “/home/pi/.nvm/versions/node/v8.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /home/pi/js-matrix-core-app/node_modules/zeromq
gyp ERR! node -v v8.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN js-matrix-core-app@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zeromq@6.0.0-beta.6 install: node-gyp-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zeromq@6.0.0-beta.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-09-05T14_20_09_058Z-debug.log

  1. Should I instead just separately install Matrix HAL and Lite (in addition to Core) to get this working? Is there a PYTHON only version of the assistant.js?

I am unclear on why the guides have variations for each ecosystem and if the ecosystems can coexist. It does not seem to be the case with the error above.

@ahsanshah,

When using JavaScript and Python, I recommend using MATRIX Lite. It is basically a wrapper around the MATRIX HAL C++ layer which speaks directly with the hardware.

MATRIX Core is essentially no longer supported as the architecture is complex and has dependencies such as zeromq that have frequent version incompatibilities.

You should be able to easily transfer your MATRIX Core Python set up to MATRIX Lite Python. The syntax will also be much easier.

So, to answer question 1, if you would like to keep your MATRIX Core implementation, I would still recommend using MATRIX Lite for your Rhasspy intent catching and no longer using MATRIX Core for future implementations.

As for question 2, yes, you should install MATRIX HAL and Lite (they will work with MATRIX Core installed) and there is indeed a Python version using MATRIX Lite Py for Rhasspy intent catching on our GitHub here.

Best,
Samreen