Direction of arrival using matrix core

I saw the code for determining the direction of arrival using HAL

but I was wondering if this information can be obtained at a higher level using python?


I was wondering if I should include audio in my Python Hal drivers, but implementing this directly will probably not be fast enough. I’m trying to integrate the C drivers directly and hope that’s possible. I’ll keep you posted.

I connected some parts of the current Matrix-Hal c++ driver with Python and rewrote the demo in Python, maybe this will help. (python 2.7 only)

Located in the branch c_wrapper

1 Like

Thank you. Are you one of the devs for the Matrix? I am not with my pc and Matrix this weekend so I cant try it out but will be anxiously wishing I could try it out.

The demo code references
Looking at the first two lines are

from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):

Hoes does it know not to run if I am using python 3.6?

and where should i put

This looks like it should go in the packages directory on the pi?

or should i just do

sudo apt install matrixio-creator-init

as described on this page

and btw, shouldnt that line read

sudo apt-get install matrixio-creator-init

No, I’m not a developer of Matrix, but actually we’re all developing for this device. :slight_smile:

matrixio_hal_wrap. py is a file generated automatically by Swig, I just took parts of the C driver and let it run through Swig. However, I don’t know much about Swig, so I packed the generated shared library “_matrixio_hal. so” into the repository.

The example stands for itself and has nothing to do with the rest of the repository, you can simply run both examples in the folder.

I’m working on a better solution generating this files and I’m thinking about rewriting the SPI-Driver, that it also uses the C-driver and not the SPI-interface, but I’m not completely satisfied with the performance of the C-driver when controlling the everloop so far.