Turn Your phone into a Speaker
Turn Your phone into a Speaker
PC Speaker is an open source software application that enables a smartphone to function as a wireless speaker for a desktop computer. Its primary function is to capture system audio from a PC or Mac and stream it over a local Wi-Fi network to an iPhone or Android device, which then plays the sound through the phone’s built‑in speaker or connected headphones. The project is composed of three main components: a sender application written in Rust for Windows and macOS, an iOS receiver app built with Swift, and an Android receiver app written in Kotlin. All source code is publicly available. The workflow begins by installing the sender program on the computer and launching it, which automatically displays a QR code. The user opens the receiver app on their smartphone and scans that code. The connection parameters are parsed instantly, and the two devices pair over the local network without requiring manual IP address entry. Once linked, all audio output from the computer is transmitted to the smartphone and played in near real time. The app supports 48 kHz, two‑channel Float32 PCM streaming over WebSocket sockets, delivering the original audio without compression artifacts. Latency is minimized through optimised buffering, and the connection is maintained even when the smartphone screen is locked or the user switches to other apps. If the Wi‑Fi signal drops briefly, the software automatically re‑establishes synchronization. The system uses native OS audio capture technologies: on macOS it relies on ScreenCaptureKit, on Windows it uses WASAPI loopback, on iOS it runs within an AVAudioEngine session, and on Android it operates as a foreground service with a persistent notification. For audio routing, the user must select a virtual audio output device on the computer, such as BlackHole on macOS, so that system sounds are sent to the sender application. The receiver app on the phone plays the stream without requiring any additional configuration. Common troubleshooting questions are addressed in a dedicated FAQ section on the project website. Typical use cases include providing sound output for a PC that lacks built‑in speakers, creating a portable audio solution while travelling, or repurposing an old smartphone as a secondary speaker. The entire setup can be completed in under one minute. The project is maintained under the Speaker Project name and is hosted at https://speaker.eggmango.com/.