element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs Attempting to get Snowboy working on the Matrix Creator
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: airbornesurfer
  • Date Created: 1 May 2020 7:27 PM Date Created
  • Views 374 views
  • Likes 1 like
  • Comments 0 comments
  • project mego
  • raspberry pi
  • element14 presents
  • matrix creator
  • google assistant
  • snowboy
Related
Recommended

Attempting to get Snowboy working on the Matrix Creator

airbornesurfer
airbornesurfer
1 May 2020
image
Raspberry Pi 2XL Robot Assistant Part 1

element14 presents  |  Matt Eargle's VCP Profile |  Project Videos

 

I know that this is all probably moot at this point, considering that Snowboy will be shutting down at some point in the next 8 months, but I'm posting this for posterity and hopefully for some kind of learning moment. In my journey to get Project Mego up and running, I initially opted to use the Matrix Creator platform and its microphone array to serve as the audio input for the voice assistant. I had hoped to be able to utilize the myriad features on the board for extensions to my setup down the road, but, it seems, I've run into several dead-ends. It is in this article that I shall outline my steps taken in the hope that someone more knowledgeable than me will be able to shed some light on my mistakes.

 

  • First, let's assume that I've installed Raspbian (Stretch, as later versions are not supported by the Matrix boards) and plugged the Creator into the Pi correctly.
  • Then, I'll install the Matrix packages

wget 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-get update
sudo apt-get upgrade
sudo apt install matrixio-creator-init
sudo reboot now
sudo apt install matrixio-kernel-modules
sudo reboot now

  • Once that's set up, I can verify that the microphone works using arecord and aplay
  • Now, I'll setup up a project and install the Google Assistant SDK per Big G's instructions
    • https://developers.google.com/assistant/sdk/guides/library/python/embed/config-dev-project-and-account
    • https://developers.google.com/assistant/sdk/guides/library/python/embed/register-device
    • https://developers.google.com/assistant/sdk/guides/library/python/embed/install-sample
  • With the Assistant SDK set up, I can verify that the demo scripts do work
  • Next, I can start to set up Snowboy
    • Install dependencies: sox, portaudio, pyaudio

sudo apt-get install python-pyaudio python3-pyaudio sox
pip install pyaudio

    • Compile Swig

wget http://downloads.sourceforge.net/swig/swig-3.0.10.tar.gz
sudo apt-get install libpcre3 libpcre3-dev
./configure --prefix=/usr \
  --without-clisp \
  --without-maximum-compile-warnings &&
make
make install &&
install -v -m755 -d /usr/share/doc/swig-3.0.10 &&
cp -v -R Doc/* /usr/share/doc/swig-3.0.10

    • Install Atlas library

sudo apt-get install libatlas-base-dev

    • And, again, when I test the microphone with arecord and aplay, it does work
    • Clone Snowboy repository

wget https://github.com/Kitt-AI/snowboy.git

    • Compile Swig Python wapper

cd snowboy/swig/Python
make

 

Now, I have made it as far as running the demo_arecord.py script in Snowboy. The script does work with any voice model given. The standard demos do not work as I've gathered that the Matrix does not play nicely with pyaudio. This is also where I'm having trouble integrating the Assistant SDK into the Snowboy demo (in an attempt to call Assistant instances with the Snowboy wake word). As a workaround, I attempted to install GassistPi on top of this setup as a way to call Assistant with the custom Snowboy wake word, but the installer script ends up breaking the entire audio setup (I assume because it's built around pyaudio). I've tried installing the package line-by-line and even trying to replace the references to Snowboy's demo scripts with references to the aforementioned "demo_arecord" script, but I can't quite determine where the fault(s) lie.

 

At the end of the day, I understand that this will all be deprecated in a few months, but I would be curious if anyone else is able to take a crack at the original scope of this project. In the meantime, I'm going to look into more projects I could build off the Matrix platforms!

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube