Skip to content

Sending/Receiving Audio Packets via Websockets #1743

Answered by pschatzmann
mittlc asked this question in Q&A
Discussion options

You must be logged in to vote

I haven't done anything with websockets yet, but here are my 5 cents:

  • I would use some defined audio format: convert your data e.g. to a 1 channel 8 or 16 bit wav file. This minimizes the amount of data that needs to be sent and gives the receiver the information how to play it.
  • Do your projects is steps: first build and test the sending of the microphone data to the server: this let's you easily confirm that your approach is working. Having wav will also help you with your tests because you can play it easily on the server.
  • You don't really need any custom components: Just read the data from I2S via some conversion streams and write it with sendBIN in the loop or better in a seperate task

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@mittlc
Comment options

@SriramKeerthi
Comment options

@mittlc
Comment options

@pschatzmann
Comment options

@mittlc
Comment options

Answer selected by pschatzmann
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants