Reading with analogRead() inside loop is not consistent and sending data to server is slower than 125us (time between reading audio) so this solution does not work.
Using interrupt timer with flag does not solve problem,
Reading audio data inside ICACHE_RAM_ATTR function does not seem like a good solution.
It seems possible to setup, that ADC would directly write to two registers and when one is full you read and send data using CPU. However, not much documentation seems to exist.
Seems like I2S is used in similar situation, but I do not understand how to configure it.
Can someone help to configure such setup, if it is possible to do with ESP8266? At least some documentation suggestions would be appreciated too!