In the example I posted to you, you find how to capture audio in Byte format and how to send the same format to the speaker.
I just have to make this change, instead of receiving the audio from the internet, you send it the stream you receive from the microphone itself