I'm working on a project where I have to send voice through mic to a Speech recognition API using esp8266 where the voice is get processed. Is there any possible way I could do this with esp8266?
You should be able to get the project you referenced working in the Arduino IDE. It uses standard cpp files instead of ino files, but the project does use the Arduino framework (
#include <Arduino.h>). I believe there are tutorials online on how to import standard C++ code into the Arduino IDE. As long as there aren't any namespace conflicts with global variables between modules, it'll probably work.
The buffer is just a standard way of passing data (usually a byte array) between functions using a variable of a known fixed sized so that memory can be allocated appropriately. In trying to understand the code, just think of it as you would any other variable.