Photon 2 with PDM mic Argument list too long error

I would start from the download on the Particle machine learning page, which removes the unnecessary files that are causing that error while compiling locally under Windows.

Then, if you want to train and substitute your own model, export the project from Edge Impulse but only replace the src/tflite-model directory, not the whole project.