Mihonarium/StreamToSpeaker
Tentang
Virtual audio output for Windows that streams your PC's sound to AirPlay, Sonos, and UPnP speakers.
Desain dan mediaPertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- +1
- dalam 15 hari
- +3
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
Asli
Stream To Speaker plays your Windows PC's sound on a speaker on your network: a Sonos or another UPnP (DLNA) speaker, a HomePod, an Apple TV or another AirPlay speaker. Pick the speaker from the app's icon in the system tray on the taskbar, and music, videos and games play there; Windows' volume keys set its volume.
Download the installer (free) for Windows 10 (version 1809 or later) and Windows 11 on x64 PCs, or get it from the Microsoft Store:
Install
Run the installer. It installs the app and its sound driver, which adds the Stream To Speaker output device to Windows: that is how the app gets the PC's sound. Microsoft has certified the driver. Setup asks for administrator approval, and at the end offers to start the app. It doesn't run on ARM64 PCs or on Windows Server.
To update, run a newer installer over the old one; Setup asks for a restart when an update replaces the sound driver. Uninstalling removes the app and its driver but keeps your settings, so a later install still knows your speakers and their pairings.
Speakers it plays on
- Sonos (IKEA SYMFONISK too) and other speakers and players that play over UPnP (DLNA), such as KEF, Denon HEOS, Volumio and moOde. Speakers grouped in the Sonos app show as one entry, such as "Living Room + Dining Room": the sound plays on the whole group, and the volume slider sets the whole group's volume. To play on one speaker of a group, ungroup it in the Sonos app.
- AirPlay speakers, older ones and AirPlay 2 alike: HomePods, Apple TVs, AirPort Express, shairport-sync and other AirPlay receivers. The first time you pick an Apple TV it asks for the 4-digit code it shows, and a speaker with an AirPlay password asks for the password; the app remembers both. Two HomePods set up as a stereo pair show as one speaker; the app plays to the pair, but that hasn't been tested on real HomePods yet.
- A speaker that has both, such as a Sonos with AirPlay, is listed once, and you choose which way the sound goes (see Everyday use).
- Sendspin speakers and Music Assistant, both experimental: see Music Assistant and Sendspin speakers.
The sound plays on one speaker (or one Sonos group) at a time. It doesn't play on Chromecast or other Google Cast speakers. A Bluetooth speaker paired with the PC is one of the PC's own outputs: choose it under This PC, or in Windows. Sonos and other UPnP speakers get the sound uncompressed, at CD quality (16-bit, 44.1 kHz stereo); AirPlay speakers get it lossless (ALAC), except on an AirPlay 2 speaker's buffered stream, which is AAC.
Getting started
The first time the app opens, it shows its welcome steps: it asks where this PC's sound should play and lists the speakers it finds on your network. Choose a speaker here. Stream To Speaker changes the output device in Windows for you. If the speaker supports a test chime, the app asks whether you heard it. Choose I heard it to play this PC’s sound there. For a speaker without a chime, choose Switch to followed by its name. For Kitchen, the app then says Kitchen now plays this PC’s sound. If the speaker can't play the sound, it moves to this PC and the app tells you why. The last step offers Start when I sign in to Windows. If no speaker shows up, Speaker missing? under the list helps. Use this PC for now opens the ordinary panel. If you leave the welcome steps before choosing a speaker, they return next time you start the app with no speaker remembered.
I didn't hear it opens Can't hear it? for that speaker (see When it doesn’t work). It checks whether this PC received a request for the chime or the speaker connected back during an AirPlay chime. You can try again, report a problem, choose another speaker or use this one anyway. Settings → About → Show the welcome steps again runs these steps again.
Everyday use
The app’s icon is in the system tray on the taskbar, sometimes under its ^ arrow (Show hidden icons). The welcome steps, the window and the pop-up you see when you first close the window show where to look. Click the icon to open the panel.
- At the top: where the sound plays now, its status (such as Playing), and the volume there.
- The list: This PC, then your speakers. Click a speaker to move the sound there, or This PC to bring it back. After a switch to Kitchen, the pop-up says Playing on Kitchen. When this PC has several output devices, such as speakers and headphones, each is listed under This PC. Click one to move the sound there. A speaker's gear opens its page. A speaker the app can't find right now says Not found, and Why? next to it opens Speaker missing?.
- The delay. A speaker plays the sound a moment after the PC, so a video's sound can trail its picture; the panel shows about how much. Sound lags the video? Less delay takes off 25 or 100 ms. Sound cutting out? More delay adds some back. Where there is a choice, How this PC sends sound to … lists each connection and its delay. The speaker’s own connection appears as Sonos, the maker’s name, or UPnP when the maker is unknown. With no saved delay settings, HomePods and HomePod stereo pairs start on AirPlay · Real time at about 0.2 s. A shairport-sync receiver that offers only AirPlay 1 starts on AirPlay · Real time at about 0.3 s. All other AirPlay receivers start on AirPlay · Buffered at about 2 s, including other makers’ AirPlay 1 speakers. A Sonos listed with both connections starts on Sonos. Choose AirPlay · Real time for a shorter delay or AirPlay · Buffered if the sound cuts out. If you hear nothing after choosing AirPlay · Real time, click Back to Buffered.
- Can't hear it?, Speaker missing? and Settings.
Opening the app from the Start menu shows the same controls in a window. Closing the window doesn't stop the sound. A right click on the icon opens a menu to switch speakers, open Settings or quit. Quitting returns the usual sound output to this PC. Apps set to the Stream To Speaker output device go silent.
The panel, Settings, dialogs and pop-ups follow Windows’ text size and contrast theme. Ctrl+Plus and Ctrl+Minus adjust the app’s zoom. Ctrl+0 returns it to the size you chose in Windows.
The sound stays on a speaker until you switch it. If the speaker can't play it (it stopped responding, someone else started playing on it, or this PC moved to another network), the app moves the sound to this PC and says why. It never moves the sound to a speaker by itself. When you send all sound to a speaker, connecting headphones moves the sound to them even if Windows hasn't already switched. When they disconnect, the sound stays on this PC.
Windows' volume keys and slider set the speaker's volume. On Sonos and other UPnP speakers it works the other way too: the speaker's own buttons move Windows' slider. In Windows' sound settings, the Stream To Speaker output device carries the speaker's name, such as "Kitchen (Stream To Speaker)".
A speaker's page has a test chime, an exact delay, tone controls (bass and treble, or ten bands with presets), a volume limit, song titles on speakers that can show them, the name the app uses for the speaker, and Hide from the list.
When it doesn't work
Two pages, linked at the bottom of the panel, look for the problem:
- Can't hear it? follows the sound step by step: something playing on this PC, Windows sending it to the Stream To Speaker output device, the connection, the speaker getting the sound, its volume. It stops at the first step that fails, says why and offers the fix, and updates by itself as things change. With sound on this PC, it checks the Windows output device and its volume.
- Speaker missing? shows where the app is searching and which speakers
are in the list. It includes network checks, speakers you hid, and setup
for speakers that Music Assistant controls. You can search again or add a speaker by its IP address or
its
.localname, found in its own app or your router’s list of devices.
The usual causes:
- The speaker is on another network. A speaker shows up when it is switched on and on the same network as this PC. Guest Wi-Fi usually keeps devices apart, and a VPN can keep the PC from reaching your speakers.
- Windows treats your network as public. Windows Firewall may then keep speakers from reaching this PC. If it is your home network, open its properties in Windows' network settings and choose Private network.
- A firewall stops the app. In Windows Security, open Firewall & network protection → Allow an app through firewall, and make sure Stream To Speaker is selected.
- The Stream To Speaker output device is missing or turned off. The panel says so and offers Repair. Putting back a missing output device needs administrator approval.
If that doesn't help, Settings → Report a problem puts together a report
you can read first. Choose what goes in it, then copy it, save it as a file,
or paste it into a GitHub issue. Submitting an issue requires a free GitHub
account. Anyone can read it after you submit it. The app's log is %LOCALAPPDATA%\StreamToSpeaker\stream-to-speaker.log.
Settings
These switches start off except for the pop-ups.
General
- Start when I sign in to Windows starts the app in the system tray without opening its window.
- Show pop-ups about where the sound is playing is on by default. Pop-ups about a failure or in response to an action still appear. A pop-up stays while the pointer rests on it. A speaker failure stays visible until you dismiss it, open the panel, or the situation changes. When Windows asks for quiet, including during a full-screen game or a presentation, the panel keeps the latest pop-up. When Windows accepts pop-ups again, one that still applies can appear. A “Playing on” reminder stays on the panel if the moment has passed.
Sound
- Send only selected apps to the speaker keeps everything else on this PC. The speaker stays quiet until a selected app plays. Start the app and play something so Windows lists it. Choose Select apps in Windows… and set its output device in Windows to the one with “Stream To Speaker” in its name. Settings lists the apps Windows sees using that device now. Windows remembers the choice even if you turn off this switch. To undo it, choose Default for the app’s output device in Windows. Some apps need to restart. Selected apps are silent while Stream To Speaker isn’t running. Turn on Start when I sign in to Windows to have it open for them at sign-in.
- Use the speaker as the default communication device moves the output device Windows uses for calls. Even with this off, a browser or call app using the usual output device plays on the speaker when you select it.
- Switch back to this PC after 30 minutes with nothing playing.
- Keyboard shortcuts for the delay work in any app. Ctrl+Win+Comma gives 25 ms less delay and Ctrl+Win+Period gives 25 ms more delay. Hold Shift too for a 100 ms step. Change… sets other keys.
Other devices on this network
- When a device you didn’t pick plays the stream applies while a speaker plays. Let it play and tell me lets the device play and shows its name or address with Stop and Allow. Always let it play lets it play without a note. Always block it refuses it and offers Allow. The stream is whatever is playing through Stream To Speaker.
- Let Music Assistant play this PC’s sound is described below.
- Turning on Control from your phone shows a QR code to scan with your phone and a link you can copy. The page shows where the sound plays. Anyone on your network with that link can switch speakers and set volume and delay. Make a new link stops the old link working.
- Let scripts and home automation control this app is described under Phone, scripts and the command line.
Advanced settings, at the bottom of Settings, has delay and AirPlay options for speakers that don’t play right with the usual settings. Expand it to see which values have changed or to reset them. You can undo the reset until you change an advanced setting or leave Settings.
About shows the version and the daily update check. When you can update from the panel, it says what installation interrupts. Choose Update now to start the download and see its progress in About. If Setup is already downloaded and ready, Install starts it.
Music Assistant and Sendspin speakers (experimental)
Music Assistant is a music server, often run with Home Assistant, that plays on many kinds of speakers; Sendspin is its way of streaming to them.
Sendspin speakers, such as ESPHome speakers that play from Music Assistant: turn on Use Sendspin speakers under Speaker missing?. This PC then plays to them directly, without Music Assistant. A speaker that asks to be paired shows or says a code: type it when the app asks. The pairing is remembered.
Music Assistant can take this PC's sound as a line-in and play it on any speaker it controls. Turn on Let Music Assistant play this PC's sound in Settings and follow the three steps on the page that opens:
- Music Assistant finds this PC by itself when both are on the same network, and lists it among its players. Its built-in Sendspin Source plugin makes the paired PC available as a line-in.
- In Music Assistant, open Settings → Players → this PC and press Start setup and choose Pair device. Type the 6-digit code shown on this PC.
- In this PC's player settings in Music Assistant, choose a speaker under Automatically play line-in on. Then pick Music Assistant in this app's speaker list and play something on this PC. To start it manually, select a speaker in Music Assistant, open Browse and play this PC's line-in.
Music Assistant gets this PC's sound only while it is picked here. Music Assistant sets each of its speakers' volume and delay. While Music Assistant isn't connected to this PC, it can't be picked, and if its connection ends while it plays, the sound goes on from this PC and a note says so.
If Music Assistant runs on another network (another VLAN or subnet), it can't find the PC by itself: add the PC's address under Manual IP addresses for discovery in its Sendspin settings. It then connects to port 8928 on the PC, so that port must be free, and a firewall between the networks must let the connection through.
Phone, scripts and the command line
From a phone: turn on Control from your phone in Settings and scan the QR code. To scan it again later, choose Show the code and link. The page is the panel on your phone. First comes what plays now: where the sound is, its volume, and the delay, with buttons such as 25 ms less delay and 25 ms more delay, how this PC sends sound to the speaker where there's a choice, and an exact delay to type in; or what the app has to say instead, with its buttons, such as Cancel while a speaker connects. Below that, tap a speaker or a PC output device to move the sound there. The page keeps itself up to date and says when it can't reach the PC. When its link stops working (Control from your phone turned off, or a new link made), it says where to get the link, tries again every half minute and has Reload. A page left open while the app updated from version 0.2.0 or earlier says its link no longer works: reload it in the browser. For what only the PC does, such as answering the app's questions, pairing and Settings, it says what to choose there.
From scripts and home automation: turn on Let scripts and home
automation control this app in Settings. It shows the API address and
has Copy key. The key goes in each request's Authorization header;
this lists the speakers:
curl.exe -H "Authorization: Bearer PASTE-THE-KEY-HERE" http://192.168.1.23:5901/api/speakers
Put the API address from Settings in place of http://192.168.1.23:5901/api:
it is this PC's address and the port the app listens on, which is 5901
unless another program had that port. GET /api/status gives what the panel shows: where the sound
plays and its volume, This PC and the speakers with their ids, and the
delay. When the PC has several output devices, each has an entry in places
with an ID starting with pc-output:. Send its full ID to POST /api/select
to play there.
A speaker ID selects that speaker, and this-pc brings the sound back to This PC.
POST /api/volume sets the volume;
POST /api/delay removes, adds or sets delay; and POST /api/act presses a
button the status offers. Home Assistant, for one, can send these with its
RESTful Command integration. The scripts API requires the key from Copy key.
If a script used your phone link’s key, replace it with the scripts key. Every call, with examples:
TECHNICAL.md.
Command line
These options are for running the app as a service, from scripts, or on unusual networks; most people never need them.
The program is stream-to-speaker.exe in the folder Setup installed it to,
C:\Program Files\Stream To Speaker unless you chose another. In
PowerShell, for example:
& "C:\Program Files\Stream To Speaker\stream-to-speaker.exe" --list-speakers
--help lists the options.
Running it:
--list-speakers: search the network, print every speaker found and each way to reach it, hidden ones too, and exit. Works while the app runs.--player <name-or-address>: play on this speaker: its address, its full name, or part of its name. The app starts anyway. After its first search (a few seconds) it takes the best match; if nothing matches yet, the first speaker that does later.--headless: run without the window and the system tray icon, as a service or in a terminal, where Ctrl+C quits. Without--player, a terminal offers a numbered list of speakers (--no-interactiveskips it). It can't run beside the app's window on the same--port.--no-tray: no icon in the system tray. The window opens at start, and closing it quits.
The phone page and the API:
--web: turn on Control from your phone for this run. With--headless, the link is printed once at start.--web-link: print the phone page's link and exit, making one if there is none yet. Run it as the Windows account the app runs under, with the app's--portand--advertise-ip.--port <number>: the port for the phone page, the API and the stream that UPnP speakers fetch. Default 5901.--bind <address>: the address that port listens on. Default 0.0.0.0, every network. With 127.0.0.1 only a speaker running on this PC can fetch the stream, and it has to be added by its address.--advertise-ip <address>: the PC's address to give speakers, to search from and to put in the phone link. By default, for each speaker the address the PC reaches it from; searches go out on every network.
Finding speakers:
--no-discovery: don't search for UPnP or Sendspin speakers. Speakers added by address still play, and AirPlay speakers are still found.--no-airplay: don't search for AirPlay speakers.--no-sendspin: no Sendspin speakers and no Music Assistant input.--sendspin-source: offer this PC's sound to Music Assistant for this run, even when that is off in Settings.--ssdp-interval <minutes>: how often to search for UPnP speakers again. Default 5; 0 counts as 1.
The sound:
--source <auto|driver|wasapi-loopback|sine>: where the sound comes from.auto(the default) gets it through the app's driver, or, without the driver, through Windows' loopback capture;sineis a 440 Hz test tone.--device <name>: when the sound comes through loopback capture, the output to capture, by part of its name. Without it, the Stream To Speaker output device, or Windows' default one when that device is missing.--no-silence-injection: send plain silence while nothing plays, instead of a faint noise that keeps speakers from treating the stream as ended.--silence-packets-threshold <count>: how many silent packets in a row count as silence. Default 50, about half a second.--silence-pace-ms <ms>,--rate-fudge-ppm <ppm>,--latency-adjust-step-frames <frames>: fine tuning of the delay; see TECHNICAL.md. The controls in Advanced settings change these values for the current run.--log-level <error|warn|info|debug|trace>: how much goes in the log. Defaultinfo(warnfor--list-speakersand--web-link).
Privacy and your network
- Sonos and other UPnP speakers fetch the stream from this PC over HTTP. While a speaker plays, any device on this network that has the stream’s address can play it by default. The speaker you pick, rooms in its group and devices you allow for that speaker play without a note. Rooms keep their access until you stop or pick another speaker, even if the group changes.
- When another device plays the stream, the panel and speaker page tell you. Stop cuts its stream and blocks that address across speakers and restarts. Undo, Allow again in Settings, or picking the blocked speaker lifts the block. Allow lets the device play with that speaker for the time shown. Close hides the note for this run and the device keeps playing. When the place is This PC, every other device is refused. Picking This PC or quitting keeps the sound on This PC the next time the app starts.
- The phone link and the scripts key each let whoever has them control the
app on your network. They are kept with the speakers' passwords and
pairings in
%APPDATA%\StreamToSpeaker\config.json, encrypted for your Windows account. - Once a day the app asks GitHub whether there is a newer release, sending only its version, and tells you in Settings and About when there is one. Nothing is downloaded or installed by itself. Check for updates once a day, in Settings → About, turns the check off.
Verifying a download
With GitHub's command-line tool, gh:
gh attestation verify StreamToSpeakerSetup.exe -R Mihonarium/StreamToSpeaker
proves the file was built by this repository's CI from a specific commit.
Offline, add --bundle with the .sigstore.json file attached to the
release (StreamToSpeakerSetup-<version>.exe.sigstore.json).
The driver is certified by Microsoft. The Driver reproducibility workflow rebuilds it from this source and checks that the Microsoft-signed driver inside a release installer is that build. A release installer is signed, and the release published, only after the check passes. Of earlier releases, the installers of v0.1.6, v0.1.9 and v0.1.10 have passed it too. Each installer build records which driver package it bundled. Pre-releases built with the test-signed driver, which needs Windows' test-signing mode, skip the check.
Building from source
How the app is built and how it works, including the HTTP API: TECHNICAL.md. The driver's signing pipeline: docs/driver-signing.md.
License
Source MPL-2.0. Released binaries: free to install and use, no redistribution or modification — LICENSE-BINARIES.md.
Driver scaffold derives from Microsoft's sysvad sample (MIT); UPnP/SSDP patterns from swyh-rs (MIT).
Jelajahi proyek terkait
Memuat…