Mumble 和 Discord 之间的简单语音桥接。
Mumble Discord Bridge is an open source Go application to bridge the audio and chat between Mumble and Discord.
It was built with the idea that people can continue to use the voice application of their choice.
The project now includes a modular library (pkg/bridgelib) that enables multiple bridge instances to share a single Discord client.
Key features of the new architecture:
Mumble Discord Bridge can be hosted on any server or computer and ships in a Docker container for convenience.
For those looking for SaaS solution take a look at patchcord.io. patchcord.io offers a free tier for those who want to try out Mumble Discord Bridge, and paid tiers for those who want to handle larger communities.
Several configuration variables are required to run the bridge. All variables can be set using command line flags or in the environment. The variable can also be specified in an .env file located in the working directory. See the help documentation for all the options
./mumble-discord-bridge --helpThe bridge can be run with the follow modes:
…In "auto" or "manual" modes, the bridge can be controlled in Discord with the following commands.
Important: Discord commands only work when sent from the configured channel (DISCORD_CID). Commands from other channels are ignored. This ensures proper isolation in multi-bridge deployments.
!COMMAND link
(Discord Only) Commands the bridge to join Discord voice and Mumble.
The user must be in the configured voice channel (DISCORD_CID) for this to work.
!COMMAND unlink
(Discord Only) Commands the bridge to leave Discord voice and Mumble.
!COMMAND refresh
(Discord Only) Commands the bridge to unlink, then link again.There are additional commands that can be called from either Mumble or Discord.
!COMMAND help
Print help text
!COMMAND version
Print the version
!COMMAND restart
Restart the bridge
!COMMAND status
Show bridge status, uptime, and mode
!COMMAND list
List all connected users in both Mumble and Discord.A Discord Bot is required to authenticate this application with Discord. The guide below provides information on how to create a Discord bot.
Individual Discord servers need to invite the bot before it can connect.
The bot requires the following permissions:
Permission integer 36768768.
Discord GID is a unique ID linked to one Discord Server, also called Guild. CID is similarly a unique ID for a Discord Channel. To find these you need to set Discord into developer Mode.
Instructions to enable Discord Developer Mode
Then you can get the GID by right-clicking your server and selecting Copy-ID. Similarly the CID can be found right clicking the voice channel and selecting Copy ID.
Optionally you can specify a client certificate for mumble Mumble Certificates If you don't have a client certificate, you can generate one with this command:
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout cert.pem -out cert.pem -subj "/CN=mumble-discord-bridge"Prebuilt binaries are available. The binaries require the opus and libdave runtime libraries to be installed.
# Ubuntu — install runtime dependencies
sudo apt install libopus0
# Install libdave runtime library
# Option A: use the Makefile target (requires cmake, g++)
make install-libdave
# Option B: manually copy libdave.so to /usr/lib
# See the godave repository for details: https://github.com/disgoorg/godave
# Ensure the linker can find libdave
export LD_LIBRARY_PATH="$HOME/.local/lib:$LD_LIBRARY_PATH"curl -s https://api.github.com/repos/stieneee/mumble-discord-bridge/releases/latest | grep "mumble-discord-bridge" | grep "browser_download_url" | cut -d '"' -f 4 | wget -qi -This project is built and distributed in a docker container.
A sample docker command can be copied from below.
This service command will always attempt to restart the service due to the --restart=always flag even when the server is restarted.
For testing purposes it may be best to remove the restart flag.
Replace the environment variables with variable for the desired mumble server, discord bot and discord server/channel.
# Sample for testing
docker docker run -e MUMBLE_ADDRESS=example.com -e MUMBLE_PASSWORD=optional -e DISCORD_TOKEN=TOKEN -e DISCORD_GID=GID -e DISCORD_CID=CID stieneee/mumble-discord-bridge
# Run as a service
docker docker run -e MUMBLE_ADDRESS=example.com -e MUMBLE_PASSWORD=optional -e DISCORD_TOKEN=TOKEN -e DISCORD_GID=GID -e DISCORD_CID=CID --restart=always --name=mumble-discord-bridge -d stieneee/mumble-discord-bridge
# Stop the service
docker stop mumble-discord-bridge && docker rm mumble-discord-bridgeThe following options can be set using environment variables or with command line options.
Note boolean values are flags when set via command line, example -mumble-insecure -mumble-disable-text not -mumble-insecure true -mumble-disable-text true.
| Environment Variable | CLI | Type | Default | Description |
|---|---|---|---|---|
| CHAT_BRIDGE | -chat-bridge | flag | false | enable text chat bridge |
| COMMAND | -command | string | "mumble-discord" | command phrase '!mumble-discord help' to control the bridge via text channels |
| COMMAND_MODE | -command-mode | string | "both" | [both, mumble, discord, none] determine which side of the bridge will respond to commands |
| DEBUG_LEVEL | -debug-level | int | 1 | discord debug level |
| DISCORD_CID | -discord-cid | string | "" | discord cid, required |
| DISCORD_TEXT_MODE | -discord-text-mode | string | "channel" | disable sending direct messages to discord |
| DISCORD_GID | -discord-gid | string | "" | discord gid, required |
| DISCORD_TOKEN | -discord-token | string | "" | discord bot token, required |
| MODE | -mode | string | "constant" | [constant, manual, auto] determine which mode the bridge starts in |
| MUMBLE_ADDRESS | -mumble-address | string | "" | mumble server address, example example.com, required |
| MUMBLE_CERTIFICATE | -mumble-certificate | string | "" | client certificate to use when connecting to the Mumble server |
| MUMBLE_CHANNEL | -mumble-channel | string | "" | mumble channel to start in, using '/' to separate nested channels, optional |
| MUMBLE_DISABLE_TEXT | -mumble-disable-text | flag | false | disable sending text to mumble |
| MUMBLE_INSECURE | -mumble-insecure | flag | false | mumble insecure, ignore ssl certificates issues |
| MUMBLE_PASSWORD | -mumble-password | string | "" | mumble password |
| MUMBLE_PORT | -mumble-port | int | 64738 | mumble port |
| MUMBLE_USERNAME | -mumble-username | string | "Discord" | mumble username |
| MUMBLE_BOT | -mumble-bot | flag | false | exclude bot from mumble user count, optional, requires mumble v1.5 or later |
| PROMETHEUS_ENABLE | -prometheus-enable | flag | false | enable prometheus metrics |
| PROMETHEUS_PORT | -prometheus-port | int | 9559 | prometheus metrics port |
| TO_DISCORD_BUFFER | -to-discord-buffer | int | 50 | jitter buffer from Mumble to Discord to absorb timing issues related to network, OS and hardware quality. (Increments of 10ms) |
| TO_MUMBLE_BUFFER | -to-mumble-buffer | int | 50 | jitter buffer from Discord to Mumble to absorb timing issues related to network, OS and hardware quality. (Increments of 10ms) |
To ensure compatibility please edit your murmur configuration and add the following
opusthreshold=0This ensures all packets are opus encoded and should not cause any compatibility issues if your users are using up to date clients.
The chat bridge feature will relay chat messages between mumble and discord channels. To enable the feature the MUMBLE_DISABLE_TEXT must be false and DISCORD_TEXT_MODE must be set to "channel" (the default state). Finally the CHAT_BRIDGE variable must be set to true.
This project requires Go and CGO to build from source. Two system libraries are required:
# Ubuntu/Debian
sudo apt install libopus-dev cmake g++ pkg-config
# Install libdave (downloa暂无开放 Issues,或尚未同步最近议题。