Skip to content

Repository files navigation

audio-loopback-streamer

Laptop streaming audio data to phone

🚨🚧Work in progress!!!🚧🚨

This project is intended for audio producers that want to hear what their track sounds like on other devices in real-time. It streams audio from your computer via PortAudio and WebSockets to your phone! Or really any device you want.

Installation & Usage

Clone the repository and run npm install in the root directory. You need node.js to be installed on your computer.

You need to set up two servers, one backend to capture the audio and stream over WebSockets, and one frontend to serve the website. To start the backend server run

npm run dev:backend

You will be promted to select a device. I've done my best to narrow down the options. For example, you won't get options for devices with "microphone" in the name. Just follow the instructions on the screen. If you see it print a bunch of stuff, your device may not be open. It should say "Stream started" when the input device is streaming.

Screenshot of audio device selection for my computer

In a separate terminal, run

npm run dev:frontend

This should host an HTTP server on your computer. This command should return a few IP addresses, and you should connect to one. On Windows, I suggest setting up a mobile hotspot and connecting your device to your computer.

Screenshot of phone when connected to computer

Notes

I've done my best to account for the most common failure modes. I would say this project is in a usable state. I made music with it for like 3 hours straight and I love it, but getting everything connected at the start is a pain.

TODO

  • Fix buffer issue when user resumes playback.
  • If possible: Allow background playback (iOS is super strict though)
  • Optimization: Don't broadcast audio when there are no clients.

About

Intended for audio producers to hear their track on other devices in real-time. This streams audio from your computer with PortAudio to, for example, your phone!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages