Stream recorded audio from browser to server Stream recorded audio from browser to server node.js node.js

Stream recorded audio from browser to server


I'm doing this currently with some software that allows for streaming to internet radio servers via your web browser.

I use the WebAudio API along with getUserMedia to get live PCM audio data from the sound device. From there, I convert this data from 32-bit float to 16, 12, or 8 bit data depending on the amount of bandwidth available. This converted int samples are written to a stream setup with BinaryJS which wraps streams on both the Node.js and the client. As a bonus with BinaryJS, you can have as many streams open as you want, so I use a second stream over the same WebSocket connection for control data.

http://demo.audiopump.co:3000/