Record and stream audio

Hi guys, I’m heaving a really hard time with a project of mine.
I’m looking for a way to record audio from the microphone, and send it as chunks while still recording, such that the receiver will be able to continuously hear the transmitted audio.

I’m heaving a difficult time to figure out which audio format (codec) should I use, and what good open source packages in Go can help…

I thought about using the go binding for portAudio, I think it is recording audio to binary raw data.
But then, how can I play chunks one by one such that the listening will be continuous ?
Anyone can give me a direction please ?

What about pcm? It’s enough.You can also save it on disk

My little suggestion about continuous:

PhoneA <—(websocket)-> TalkServer-<—(websocket)–>PhoneB

I think post audio data to mq and handle it with another program is better

Maybe this repo can help you https://github.com/hraban/opus.git