Transfer audio buffers from a Python script to a Go server?

I am a beginner trying to find a way to stream audio on a local server. I have a Python script that creates some binary data from a robot’s microphone, and I want to send this data to be displayed on a local Go server I created.

I read somewhere that web sockets could be a solution.
But what’s the simplest way to upload the audio buffers from the Python script? And how would I retrieve this raw binary data so that it can be streamed from the web app?

Many many thanks.

A quick search found https://stackoverflow.com/questions/16978301/html5-audio-livestreaming#16981228

This indicates a regular HTTP response would work.

One way of making this work is to have the python script serve the audio data over http and have the Go server use httputil.ReverseProxy to send the audio data requests to the python script.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.