MATRIX Voice Detection PocketSphinx on Raspberry Pi

|
Here we will setup speech detection using Pocketsphinx on your Raspberry Pi with MATRIX Voice. PocketSphinx is an easy to use speech recognition engine, mainly focused on IOT and mobile devices. PocketSphinx is actually a library that works hand in hand with another library ‘SphinxBase’ which provides common functionality across all CMUSphinx projects. To setup Pocketsphinx, you have to install both Pocketsphinx as well as Sphinxbase.
Video Demo
You like this video, click the subscribe below to subscribe my youtube channel for future updates.
Image result for utsource logo

Sponsor Link

This Project is Sponsored by UTSource. UTSource is a professional electronic components supplier.

 Components Needed

  • MATRIX Voice (Click to Purchase)
  • Raspberry Pi 3 (Click to Purchase)
  • Micro SD Card (Click to Purchase)
  • Active Internet Connection

Steps

Step 1 : Setting Up Raspberry Pi[AdSense-C]
Download and burn latest Raspbian image to a micro SD card and insert it into the raspberry Pi. Now power it up with a power adapter that can provide at least 2.5 Ampere. Now fire up your terminal and create a password for the user ‘pi’ by executing the command
sudo passwd pi
Connect your Raspberry Pi to a WiFi router or Wired network and make sure it is connected by checking whether it is getting an IP address from the switch. Now perform and update and upgrade by running
sudo apt update -y 
sudo apt upgrade -y
sudo apt install npm oracle-java8-jdk
Step 2 : Install MATRIX Malos
Follow below steps to install MATRIX Malos. Once you finish installing, reboot you raspberry pi.
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-get update
sudo apt-get upgrade
sudo apt install matrixio-malos-wakeword git build-essential cmake
reboot
When the pi boots up, malos should be running as a service on the backgroud.
Step 3 : Install Matrixio Malos Wakeword
sudo apt install matrixio-malos-wakeword git build-essential cmake
After performing installation, do a reboot. After the reboot, matrix-malos and matrix-malos-wakeword should be running as service. You can check that by running
ps aux | grep -i malos
Step 4 : Download and Build PocketSphinx Scripts
git clone https://github.com/matrix-io/matrix-creator-pocketsphinx.git 
cd matrix-creator-pocketsphinx 
mkdir build 
cd build 
cmake .. 
make -j $(nproc)

Step 5 : Setting Up Language and Dictionary

Create a folder “assets” inside matrix-creator-pocketsphinx/build/demos
cd matrix-creator-pocketsphinx/build/demosmkdir assets
Download a sample dictionary form here, extract it and place it inside “assets” folder.
Step 6 – Running the Demo
Now go inside matrix-creator-pocketsphinx/build/demos folder and start running the script using below command
./pocketsphinx_demo -keyphrase "MATRIX" -kws_threshold 1e-20 -dict assets/6706.dic -lm assets/6706.lm -inmic yes -adcdev mic_channel8
Try “MATRIX EVERLOOP” “MATRIX STOP” “MATRIX CLEAR”
You like this video, click the subscribe below to subscribe my youtube channel for future updates. Adding Your Own keywords Create your own wordlist as save it as a file as shown below
startstoppowerdownrobot startrobot stoplights onlights offcamera streamstart voice record
Upload this file to Sphinx Knowledge Base Tool and click on “Compile Knowledge Base”. You will be provided with some new asset files. Dowload the file and update assets folder.[AdSense-B] If you are stuck somewhere or have anyquestions, please feel free to ask it in our community. Rate the Project Did you find this page useful? Help us to improve by rating this page. [RICH_REVIEWS_FORM] [RICH_REVIEWS_SNIPPET stars_only=”true”]

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *