Amazons Alexa hands free?


There is an Alexa demo already, and I got that working, although it should be able to give previews of audio books but that seems to fail, so maybe it cannot read audio books?

But for now the demo requires more than just a keyword to activate it, you need to get your hand close to it. I am hoping it will be possible to use the hands free version that Amazon seem to have released.

Has anyone been working on this? I am not sure its something I can do myself. I am also hoping to use some other voice recognition software(Snowboy, Jarvis or PocketSphinx) to generally control the Matrix Creator and the Pi hands free, so maybe it could control the TV, change channel and such with voice commands, maybe show the humidity level with the LEDs when asked and start Alexa when asked.

In which case, it would also be very useful if you could quit / exit from Alexa hands free with a voice command. Not sure if Alexa can exit back to the program that launched it?

Or even better, if you could use several keywords for using different voice assistants, like if you say Alexa… some command, it uses Alexa, and Matrix… some command, it uses the other voice interface.

There is a PocketSphinx demo available to test here

I’m currently working on trying to make IR commands with voice, by combining both demos.

Yup, but for some reason it does not work. Maybe because I have updated some stuff to versions newer than what this build expects, not sure. Does seem to be the best way to get it working so far.

The PocketSphinx is working. I can now use voice control lights through Philips Hue API and any IR devices with LIRC.
Once set up, the commands are pretty easy to modify in pocketsphinx_demo.cpp like examples below.

cmd_ir = "irsend SEND_ONCE " + projector + " KEY_POWER KEY &";
cmd_lights_on = "curl -X PUT -H \"Content-Type: application/json\" -d '{\"on\":true}' \"http://philips-hue-ip-address-here/api/api-key-here/groups/1/action\"";

if (std::strcmp(hyp, “MATRIX LIGHTS ON”) == 0)system(cmd_lights_on.c_str());

Nice @adrianlee ! Can you share a video ?


I think my problem with pocketsphinx is dependencies or something. I get this error when I try to run the “make” command:

[ 85%] Built target micarray_recorder
Linking CXX executable pocketsphinx_demo
/usr/bin/ld: cannot find -lblas
/usr/bin/ld: cannot find -llapack
collect2: error: ld returned 1 exit status
demos/CMakeFiles/pocketsphinx_demo.dir/build.make:86: recipe for target ‘demos/pocketsphinx_demo’ failed
make[2]: *** [demos/pocketsphinx_demo] Error 1
CMakeFiles/Makefile2:527: recipe for target ‘demos/CMakeFiles/pocketsphinx_demo.dir/all’ failed
make[1]: *** [demos/CMakeFiles/pocketsphinx_demo.dir/all] Error 2
Makefile:117: recipe for target ‘all’ failed
make: *** [all] Error 2

I did run this command first:
sudo apt-get update && sudo apt-get install --yes pocketsphinx

I had to use force, so it was:
sudo apt-get update && sudo apt-get install --force-yes pocketsphinx

But it installed and such, but I still get the error above.

Try this one

sudo apt-get install liblapack-dev liblapack3 ibopenblas-base libopenblas-dev

That gave this error:

pi@mpi:~ $ sudo apt-get install liblapack-dev liblapack3 ibopenblas-base libopenblas-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package ibopenblas-base