MIC_ARRAY lib Docs or Source code?


#1

There is MaixPy example code I would like to refine, that includes:

from Maix import MIC_ARRAY as mic

Where can I find documentation for MIC_ARRAY code??

(I have looked High and Low)


#2

Documentation … not so much.
The source code can be found on github.


#3

Thanks Sentry


#4

The code has been removed from the github? I just can’t find it anymore.


#5

The link in my reply above still works for me.


#6

I can verify the internal C source code is still there as Sentry originally pointed out. The python demo may be another matter, the python code is in the github examples:

I do have a problem with the limited amount of routine exposure to Python, no direct access to LEDs or Mics.

This is a bit of demo code just good enough for their 5 sec demo video, pasted into Maixpy with just enough alteration to function.

The random LED blinking in random directions when a room is quit is not good for a demonstration, sensitivity is not great (not enough for Seri or Alexa functions)

One intermediate data structure that can be played with is the 16x16 grayscale heatmap returned by mic.get_map, the rectangle maps to the Mics, with corner mics getting a larger area, (C code Array voice_strength) you can scale the image down to 4x4 to get an approximate single pixel representation of individual mic strength, one can compare these to the center of rect strength to determine no direction.
You can create a flat colored heeatmap image that causes all LEDs light up with your selected color (with mic.set_led) to paint them perhaps a dim red color to indicate no signal, or another color for sound direction in center.


#7

You are probably right. I have only briefly looked at the C-code and noticed that it doesn’t use the APU. In the K210 datasheet the APU is mentioned, but in the standalone programming guide there is no mention of it. I have tried to get it to work by looking at an example, but did not succeed.
With the APU it should be possible to get a much more directed (beam forming) sound signal, which is, I think, what e.g. Google home uses.


#8

I mentioned once in an email, that Seeed recommends ODAS (a thesis project?) to impliment their various mic array application ideas, it does beam forming all in C code suitable for mobile devices. https://github.com/introlab/odas

There’s a companion app that 3D plots direction info.

Demo video is interesting:

He committed to producing a release version but has not shown any progress for months.

There is a Master and more advanced Phoenix branch, release version apparently uses fresh code.