🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🪟 Windows TippsHeader and Footer not showing in Excel(14.09.2026 um 22:43 Uhr)
🕵️ SicherheitslückenBurn Out, Or Fade Away(14.09.2026 um 14:25 Uhr)
🪟 Windows TippsKB5129194 Windows 11 26H1 Out of Band Update - Deskmodder.de(14.09.2026 um 19:25 Uhr)
🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🪟 Windows TippsHeader and Footer not showing in Excel(14.09.2026 um 22:43 Uhr)
🕵️ SicherheitslückenBurn Out, Or Fade Away(14.09.2026 um 14:25 Uhr)
🪟 Windows TippsKB5129194 Windows 11 26H1 Out of Band Update - Deskmodder.de(14.09.2026 um 19:25 Uhr)

🔧 Programmierung 🕛 vor 4 Monaten 7 Min Lesezeit
0

My speaker broke, so I built a LAN speaker

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht




What's happening?



This was around a year back when I started the project, after a small speaker that I had broke out of nowhere. Won't connect.



, , and had just started on 100 Go Mistakes and How to Avoid Them.





And WebRTC? Also, WebRTC is mostly built around browser-to-browser, peer-to-peer stuff. My setup is a server broadcasting to multiple clients over LAN, which isn't really what WebRTC is designed for. So even if I knew about it from day one, I'm not sure it would've been the right fit anyway.



WebSocket was fine. It worked. And sometimes that's enough. I didn't want to overengineer.




👀 I learned about all these new terms like PCM, WebRTC, and all that stuff during the build. So, I might say something wrong. I'm not really that familiar with them. So, just hit me in the comments if so.










The Architecture



Okay, so the high level is pretty simple.



There's a server and there are clients. The server is where the music is stored, and the clients are the devices that play it (could be the same device).



Here's what actually happens when you press play:



The server takes the MP3 file, decodes it into raw PCM (basically just bytes of sound data), and starts broadcasting those bytes over WebSocket to every connected client. No client-side decoding. The server does all of that.



Here's a high level architecture:





There's also something in the code that keeps checking, roughly every second, whether the audio playing on your device is slightly ahead or behind.



If it is, it quietly adds or removes a tiny bit of audio to bring it back in line. So small you'd never hear it.



Both of these kind of work. I tested it. I just couldn't tell you exactly why the numbers are what they are.









How I usually run it



Since my plan is to use my whole laptop as a "speaker", I usually have the server and client on the same system (my personal laptop).



And I usually have it like this:




  1. Start the server:




CODE
gophercast serve # now follow the TUI setup....






  1. Connect clients (each in a tmux split). Usually, I have around 2 clients when running on the same machine. More than 2 kind of distorts the audio quality.



CODE
gophercast play --host <ip_from_serve> --port 8080 --name "client 1"
gophercast play --host <ip_from_serve> --port 8080 --name "client 2"





The steps are the same when connecting from multiple machines. Just make sure that all of them are connected to the same LAN.



Here's a quick demo on a single machine, working as the speaker.

(Ignore the audio quality)











My take



I'm pretty happy with how this worked out.



This was my very first time working with Charm's



(I haven't tested how well it works on Mac, so I can't tell there. Also, I'm not sure Windows will work either due to oto's limitation and our hardcoded 50ms delay.)



You can find the repo here:






Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
The Gemini desktop app is now available for Windows
1 Quelle
Header and Footer not showing in Excel
1 Quelle
Burn Out, Or Fade Away
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten My speaker broke, so I built a LAN speaker

Thematisch verwandte Begriffe: speaker, broke, built · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...