This repository contains a python implementation of the optimal phased microphone array solution algorithm as detailed in "A GENERIC APPROACH TO SYNTHESIZE OPTIMAL ARRAY MICROPHONE ARRANGEMENTS" by Ennes Sarradj (2016).
sarradj.py requires the following packages:
- numpy
- pyqtgraph
- scipy
Clone this repository, or just download the file sarradj.py. Install the required dependencies.
Run the following code to generate the optimal microphone array placement with a Hansen weighting function, just as in the paper.
import pyqtgraph as pg # For plotting
from sarradj import solve_mic_positions, hansen_weight, plot
# Solve the positions of 64 mics with a Hansen weight with scaler of -2.
mic_positions = solve_mic_positions(64, 1, hansen_weight(-2))
# Plot the solved mic positions
app = pg.mkQApp()
plot(mic_positions, H=-2)
app.exec()The following shows 8 different 64-microphone placement solutions found with the code in sarradj.py. It matches the
results shown in the paper. Run python sarradj.py to replicate this plot.
