I do not think it is possible to create this on an ESP8266 or ESP32. Many of the routines used to make the detector run are based on the audio-system that is designed for the teensy. The code is therefore platformspecific in many ways. Secondly I dont think the ESP8266 is capable of this kind of processing, it does not have much active memory to use to store incoming audio-data. The ESP32 might be a better candidate but would require the setup of a good lowlevel audio-processing set of routines. Maybe someone has allready tried to do that but I havent seen this yet (I am using ESP8266 for other projects like IOT).