Stream system output to your Sonos devices
Download »
Usage
·
Report Bug
·
Request Feature
The project is built using Electron/React/Express. The image above shows the simplified flow of audio data, from capture to playback on your Sonos device.
The project utilizes electrons desktopCapturer to capture raw audio. The stream of raw audio is captured in the format of 32 bit float.
The server expects a stream of 16 bit signed integer. Hence the conversion before sending the stream to the server.
The stream is sent to the backend by IPC. Early versions of the software sent the stream via socket.io but the use of another package seemed redundant. I noticed no performance changes going from sockets to IPC.
The stream of 16 bit signed integers is encoded to mp3 with LAME. I had issues with the sample rate being inconsistent on different computers leading to a high/low pitched final result. To solve this I implemented an option to change the sample rate in the client.
The stream is now in the format of mp3 and ready for broadcast. The stream is linked to an endpoint served by express, the url of the endpoint is then sent by node-sonos to selected devices.
To get a local copy up and running follow these simple steps.
git clone https://github.com/filahf/budgie-stream.git
cd budgie-stream/
yarn install
yarn start
$(npm bin)/electron-rebuild
Or if you're on Windows:
.\node_modules\.bin\electron-rebuild.cmd
Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE
for more information.
Feel free to contact me if you have any questions.
Filip Åhfelt - filipahfelt.se
Project Link: https://github.com/filahf/budgie-stream