This guide shows you how to use the MATRIX Creator or MATRIX Voice with ODAS, a library for direction of arrival, tracking, and much more.
What is ODAS?
ODAS stands for Open embeddeD Audition System. This is a library dedicated to perform sound source localization, tracking, separation and post-filtering. ODAS is coded entirely in C, for more portability, and is optimized to run easily on low-cost embedded hardware. ODAS is free and open source. Find more at:Ā https://github.com/introlab/odas
Required Hardware
Before getting started, let's review what you'll need.
- Raspberry Pi 3Ā (Recommended). Not tested yet inĀ Pi 2 Model B.
- MATRIX VoiceĀ orĀ MATRIXCreatorĀ ā Raspberry Pi does not have a built-in microphone, theĀ MATRIX Voice/CreatorĀ have an 8 mic array ā BuyĀ MATRIX Voice/MATRIX Creator.
- Micro-USB power adapterĀ for Raspberry Pi.
- Micro SD CardĀ (Minimum 8 GB) ā An operating system is required to get started. You can downloadĀ Raspbian StretchĀ and useĀ etcher.ioĀ to flash the image onto your SD Card.
- AĀ USB Keyboard & Mouse, and an externalĀ HDMI MonitorĀ ā we also recommend having a USB keyboard and mouse as well as an HDMI monitor handy. You can also use the Raspberry Pi remotely through SSH, seeĀ thisĀ guide from Google.
- Internet connectionĀ (Ethernet or WiFi).Ā Note:Ā Pi 3 has built-in WiFi.
Let's get started
Make sure you have the Raspberry Pi running with your MATRIX board and SD card image with Raspbian flashed before starting. Install the following commands into your Raspberry Pi's terminal.
1. Installing MATRIX Software
Add Repository & Key
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
Update Packages & Install
sudo apt-get update
sudo apt-get upgrade
Install MATRIX Dependancies (one at a time)
sudo apt install matrixio-creator-init
sudo apt install libmatrixio-creator-hal
sudo apt install libmatrixio-creator-hal-dev
Reboot Your Device
sudo reboot
Install MATRIX Kernel Modules
sudo apt install matrixio-kernel-modules
Reboot Once More
sudo reboot
2. Installing ODAS
Install Required Dependancies (one at a time)
sudo apt-get install g++ git cmake
sudo apt-get install libfftw3-dev
sudo apt-get install libconfig-dev
sudo apt-get install libasound2-dev
sudo apt install libjson-c-dev
Clone & Build Our ODAS Repository
cd ~/
git clone https://github.com/matrix-io/odas.git
cd odas
git checkout yc/add-matrix-demo
mkdir build
cd build
cmake ..
make
3. Run the demo!
We need to run two applications. The first is calledĀ odaslive, this app performs all of the audio processing. The second we need to run theĀ matrix-odasĀ app that receives the results and use them to draw colors into the MATRIX Everloop.
RunĀ matrix-odas:
cd ~/odas/bin
./matrix-odas &
RunĀ odasliveĀ in the same terminal:
for MATRIX Voice:
./odaslive -vc ../config/matrix-demo/matrix_voice.cfg
for MATRIX Creator use:
./odaslive -vc ../config/matrix-demo/matrix_creator.cfg
Make some noise!ā¦ you should see a blue lights indicating where the sound is coming from.
Additional:
You can also runĀ ODAS StudioĀ to see a better visualization of the results fromĀ odaslive. Keep in mind that this cannot run withĀ matrix-odasĀ app
To Use ODAS Studio:
Have theĀ ODAS CoreĀ app running on your Raspberry Pi andĀ ODAS StudioĀ running on your personal computer. Your Pi will use a TCP socket to connect to your personal computer.
On your personal computer, download theĀ ODAS StudiorepositoryĀ and follow the installationĀ āFrom sourcesā.
The last step is to insert your personal computer's IP address into theĀ ODAS CoreĀ configuration file. Insert the following command into your Raspberry Pi and edit the configuration file located at:
for MATRIX Voice
nano ~/odas/config/odaslive/matrix_voice.cfg
for MATRIX Creator
nano ~/odas/config/odaslive/matrix_creator.cfg
Replace theĀ <IP>Ā in eachĀ ip = ā<IP>āĀ lines with the IP address of your personal computer (there are 4 lines in total). UseĀ <Ctrl + x>, pressĀ y, and then pressĀ enterĀ to save your changes.
Source: Direction of Arrival for MATRIX Voice/Creator Using ODAS