Mumble Discord Bridge
Nov 6, 2020
4 minute read

Update: I have now released a SaaS service to host a Mumble Discord Bridge for a small fee. Please checkout Patchcord.io

I am a big fan of open source services you can host yourself. While I have tried many over the years, mumble has been one that stood the test of time. Myself and a collection of close friends have used mumble for nearly 10 years to stay connected. I have hosted this server on a Digital Ocean server along with several tools and services. Now I know what you must be thinking. Why not Discord? While it is an attractive option with all bells and whistles. There are three main factors I personally don’t like about Discord. The application size, audio quality and the data collection. Discord is a heavy application to run taking roughly 10x the memory of the Mumble client. More importantly as a shared free service, audio quality is not guaranteed. I strongly believe the quality of the audio experience in Mumble is a big factor as to why we continue to use it. Finally where possible I like to reduce the number of services on my devices collecting information especially if there is a high quality easy to host alternative.

The Problem

During COVID-19 it has been common pass time to gather an extended group of friends to play games online. We have dusted off some really old games during the pandemic and tried some new. The most interesting part is the social reach these get togethers have drawn with friends of friends of friends joining in on these events. While many of us default to Mumble friends of friends do not immediately want to download another application or feel welcome joining a server of someone they don’t personally know. A conversation a couple of weeks ago went a little something like this.

Me: “Hey, it would be cool if we created something to bridge the audio between Mumble and Discord.”

Friend: “Do you think you could do that?”

Me: “Yeah probably.”

Friend: “Nah, I don’t think you could make that.”

Me:

Hold my beer…

I started this adventure with a search to see if a solution already existed. A quick Google search both excited and disappointed in the span of minute. It appeared a fellow developer had previously attempted this. After a quick pull, test and inspection it was clear this solution was not complete. The code appears to be complete for passing text but not to bridge audio. In addition the supporting library was not compiling with my current version of Node.

The previous attempt

Next I searched for supporting libraries and to my surprise I found reasonable looking libraries for both both Mumble and Discord existed for Go. This seemed like a perfect little experiment to exercise some Go fundamentals.

To Weeks Later

The Result

Github Mumble-Discord-Bridge

The first working version is available on Github and as a Docker container. The bridge connects to the audio streams from both services mixes multiple input streams from one source and forwards along a single audio stream to each service. Go channels and go routines kept the development of this simple. The most difficult part to solve on this fist version was the varability of audio packet rates. Using the fastest common rate resulted in the cleanest code and good responsive quality. While the solution isn’t perfect it is good enough to be used casually.

I highly recommend using docker-compose to spawn the container as a service that restarts if it exits. If you want to run the binary it will be nessacary to use a process manger to restart the service if it exits. I also recommend placing it as close to your mumble server as possible.

If there is a user base for it I might add text chat passthrough and announcing to inform each side of connects and disconnects. It would be also possible to improve the reconnection behavior to avoid the application restarting.

Please feel free to contribute, create issue or simply comment. I would be thrilled to hear people are using the bridge.

Enjoy and happy chatting!



comments powered by Disqus