Are the python and js wakeword examples broken for anyone else?

Hi sorry for the vauge question but I am at a loss. Everything else seems to be working fine apart from the python and js wakeword examples which ironically is the only thing i need (apart from maybe the everloop)

It seems to work find when I build the c++ examples and I have exhausted the internet chasing many rabbits down many holes and nothing.

I am not even sure what I can do to debug.

I am assuming a this point that its not the MALOS services as I am not getting anything back when I listen on the ports, nor subscribing to them, I put more logging in the callbacks and nada.

The wild flailing that it may be the mics is the last idea before I am all out of them.

Has anyone got any ideas on how I can debug/ get more information on the problem please?

Hi @sacredgeometry, have you followed the Installation and Creating Custom Phrases section for MATRIX CORE wakeword? I’ve added the link below

https://matrix-io.github.io/matrix-documentation/matrix-core/protocols/wakeword/

You can also test your microphones through the MATRIX Creator and MATRIX Voice microphone pages.

MATRIX Creator: https://matrix-io.github.io/matrix-documentation/matrix-creator/resources/microphone

MATRIX Voice: https://matrix-io.github.io/matrix-documentation/matrix-voice/resources/microphone/

Let us know if you have any more questions.

https://github.com/matrix-io/matrix-creator-malos/issues/111#issuecomment-406752339

You replied to this thread, in which I also commented on. Which resulted in you fixing the python example… is there a chance that the js one is also broken? I have just woken up so haven’t had the time to diff the python version to see the changes but will do after breakfast.

I’ve made updates to both examples, but the Python version was the only one experiencing this issue. The JavaScript version should work the same as before. Let us know if the Python changes resolves your issue.

Let me know what information would help you to debug the problem because following your instructions just got me here.

I am all out of ideas. I have had to flash my os and start from scratch trying so many different things.

With no frame of reference or documentation its really hard to know whats configured correctly.

Hey @sacredgeometry can you show me the output of the following command:

ps aux | grep malos

The output should be similar to what’s below.

root 518 0.1 0.8 665764 7872 ? Ssl 17:15 0:00 /usr/bin/malos
root 519 0.0 0.6 130744 5768 ? Ssl 17:15 0:00 /usr/bin/malos_wakeword
root 1042 0.0 0.0 1900 404 ? S 17:16 0:00 sh -c malos_psphinx -keyphrase “” -kws_threshold 1e-20 -dict “/home/pi/python-matrix-core-app/1339.dic” -lm “/home/pi/python-matrix-core-app/1339.lm” -inmic yes 2> /dev/null
root 1044 24.0 1.3 15720 12916 ? S 17:16 1:43 malos_psphinx -keyphrase -kws_threshold 1e-20 -dict /home/pi/python-matrix-core-app/1339.dic -lm /home/pi/python-matrix-core-app/1339.lm -inmic yes
pi 1135 0.0 0.0 4372 580 pts/0 S+ 17:23 0:00 grep --color=auto malos

If the malos_wakeword or malos pshinx processes aren’t running, this is most likely be the cause of your issue.

You can try reinstalling them this command:

sudo apt install matrixio-malos-wakeword

Have you tested your microphones? I’ve also replied to your recent Github comment with the same instructions.

1 Like

After your reply on github I found the reason, the malos_psphinx process wasnt starting for some reason. All good now. Thank you.

Glad to be of help. If you’re interested, I’m creating a guide on how to install the snips.ai voice assistant. I should have it ready by this week or the next. I’ll follow up here with a link.

I’m sure you don’t need this, but maybe it will make your task slightly quicker :slight_smile: I’ve done the matrix+snips setup probably a dozen times recently and it’s really rather straightforward. Here’s the kind of minimum setup I’ve found to work (I do some c++ integrations so the hal-dev is probably not necessary for others, but the rest should be):

  • flash a new sd card
  • do normal pi setup (raspi-config/wifi/ssh/etc)
  • install matrix (and os upgrades)

curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -
echo “deb https://apt.matrix.one/raspbian $(lsb_release -sc) main” | sudo tee /etc/apt/sources.list.d/matrixlabs.list
sudo apt update
sudo apt upgrade
sudo apt install matrixio-creator-init matrixio-kernel-modules libmatrixio-creator-hal-dev
sudo reboot

  • install snips

sudo apt-get install dirmngr
echo “deb https://raspbian.snips.ai/$(lsb_release -cs) stable main” | sudo tee /etc/apt/sources.list.d/snips.list
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys D4F50CDCA10A2849
sudo apt-get update
sudo apt-get install snips-platform-voice snips-platform-demo snips-watch

  • tell snips to use the matrix ‘device’ for mic input

sudo nano /etc/snips.toml

under the [snips-audio-server] section, add or uncomment and edit this line (with quotes):

mike = “MATRIXIO SOUND: - (hw:2,0)”

  • Ctrl-X, Y [saves and exits]

sudo reboot

  • run snips-watch to see output…

snips-watch -vvv

and you’re done! The demo assistant will listen and parse questions about the weather, but doesn’t actually answer anything. But you should be able to say something like:

“Hey snips [wait for about a second, it makes sound if you use headphones/speaker], what’s the weather in Paris?”

and you will see things happen in the snips-watch program you have running. Then all you have to do is go to snips.ai and make an actual assistant to replace their demo. Most anything else is covered in the snips docs directly.

IMPORTANT: One side note I’d like to make is that I have seen a few posts around here saying that you have to disable the dummy device that matrix creates during installation. Doing this will appear to work with snips, but actually breaks the majority of anything else that uses mic input (including other matrix examples!) As long as you set the ‘mike’ value in the snips.toml file correctly, it is not necessary or advisable to disable the dummy device.

@giblet37 this makes organizing all the steps much easier. Great explanation! Although the guide I’m making is with the Sam CLI tool, looks like it might be a good idea to have a separate guide for the manual installation.

Following up, I’ve linked the unlisted guide below. It’s mostly done, but I’ll be doing some more testing before publishing it.