About this project

swyh-rs is an MIT-licensed Rust reimplementation of the original Stream-What-You-Hear (SWYH) idea: it captures the audio currently playing on a Windows or Linux PC and streams it to network music players. The author wrote it partly to learn Rust, and because the original was Windows-only, had trouble with some renderers, and carried a memory leak from an old .NET UPnP library. How it works: on startup it captures audio from the selected source (WasApi on Windows, ALSA on Linux) via the cpal library, starts a built-in HTTP streaming server on a configurable port (default 5901), runs SSDP discovery to find UPnP/DLNA/OpenHome renderers on the LAN, and displays a button per discovered renderer. Clicking a button instructs the renderer (OpenHome or AVTransport) to play the stream. Discovery reruns periodically in the background. Since 1.21.0 it also speaks the SlimProto protocol directly, so squeezelite clients are discovered and controlled without needing Logitech Media Server/Lyrion. Streaming formats are lossless only: 16/24-bit FLAC (preferred), WAV, RF64 and LPCM (audio/l16). No lossy MP3/AAC re-encoding. Audio is streamed at the source sample rate. The stream is also reachable as a local internet radio URL such as http://{ip}:5901/stream/swyh.flac, with query parameters for bit depth and stream size mode. The GUI (fltk-rs) has Audio, Network, App and Status tabs. Options include audio source and sample rate, streaming format, 24-bit mode, five HTTP chunking/Content-Length modes, initial buffering, TPDF dithering for 16-bit, inject-silence to keep renderers connected, network interface selection, HTTP port, SSDP interval (0 disables discovery for serve-only mode), manual discovery trigger, UI language and theme, log level, auto-resume, auto-reconnect, RMS level monitor, and SlimProto enable/disable. Renderer buttons can be hidden by right-clicking; a volume slider appears when supported, and Shift-dragging copies volume to all active renderers. Multiple instances can run with separate config files to stream different sources to different receivers simultaneously. Compatibility notes in the README mention testing with MoOde, Volumio, Denon Heos, Sonos, Roon, Yamaha, Kef, Chromecast via Bubble UPnP, Squeezebox/squeezelite and others, with device-specific format and stream-size caveats. Known issues include firewall/port requirements (5901 for HTTP, 3483 for SlimProto), Linux audio monitoring setup, a 5-second FFMPEG analysis delay with WAV/RF64/LPCM on MPD-based players, and a VCRUNTIME140.dll requirement on fresh Windows installs. Binaries are provided for Windows x86/64 and Linux appimages; ARM builds are linked from a third party. The project is small in resource use (roughly under 8 MB RAM) and includes a CLI binary and a community Python tray icon.