A wild Loudred appeared
Loudred! Loudred!
Hmm... this Loudred appears to be trying to say something.
Loudred LOUDRED Loudred!
It seems like they're saying...that they're a Discord Audio Bot that streams audio from a MacOS audio device?
This is quite strange. Wild Loudred don't usually venture out this way. Why are you here, Loudred?
Loudred Loud!
They're saying that they're here to fix a limitation with Go Live with Discord on MacOS. Currently, MacOS users are unable to stream audio through this service, but by adding Loudred as a bot, you can stream audio through them instead.
Loud Loud Loudred!
Slow down there, Loudred! They appear to be trying to tell us how to use them to stream audio. It seems a little complicated, but I'll do my best to break it down:
The first thing you need to do is create an application with a bot, and then add it to your server.
Loudred!
Oh, thank you Loudred! They've given us some helpful documentation
- Read this to learn how to set up a Discord Bot and application
- and read this to learn how to add your bot to a server
At the end of this process, your bot page should look something like this:
NOTE: Feel free to name your bot and application something other than Loudred!
For this next step, you'll need some way of capturing your computer's sound output in an audio device
Loud! Loud!
Loudred recommends using a program called BlackHole (a wonderful program that you should consider sponsoring) for this. It works by creating a virtual audio device that you can read and write audio data to. Don't worry if you don't understand all that, we'll walk you through how to set all this up later! You can install it with homebrew by running the command:
brew cask install blackhole
Or install it using their intaller
Check out your audio devices by going to System Preferences > Sound
. You should have the following output devices:
and the following input devices:
Loudred! Loudred! LOUDRED!
For the next step, you'll need to make sure you have the following installed:
- NodeJS - Download NodeJS here
- FFmpeg - Download FFmpeg here or install it using
brew install ffmpeg
Once you have those installed, clone this repo using the following command:
git clone https://github.com/reccanti/Loudred.git
Once that's done, go into the newly created directory:
cd Loudred
...and then install its dependencies using
npm install
Loudred! Loudred!
Now that we have everything downloaded and installed, we can start the process of setting up and streaming our audio to Discord!
Loudred Loud!
If the program you're trying to stream supports changing the Audio output device, that's great! Just set your program's audio device to BlackHole
and you're finished.
A great example of this is VLC, which lets you set the output device in its Audio menu like so:
Loud! Loud!
Unfortunately, not every program supports this or makes it readily available. In this situation, you'll need to get a little more creative.
The first thing you'll need to do is make a Multi-Output Device. This is a device that will direct audio output into multiple sources. We're going to use it to direct audio to both our speakers and BlackHole. Open up the Audio MIDI Setup
program. Yours should look something like this:
Click the "+" button at the bottom and select Create Multi-Output Device
:
You should now have a Multi-output device! Make sure both "MacBook Pro Speakers" and "BlackHole 16ch" are selected, and make sure "MacBook Pro Speakers" is the Master Device. It should look something like this:
Then, right click "Multi-Output Device"'s icon and select "Use This Device For Sound Output":
NOTE: You may not hear any audio if "MacBook Pro Speakers" isn't at the top of your Audio Devices. To fix this, just deselect and reselect "BlackHole 16ch", and that should move it below the speakers
Loudred! Loudred! Loudred!
It sounds like Loudred is getting excited, we're almost done! Our next step is to set Discord's Output Audio Device. This is much easier. To do this, click the "User Settings" gear at the bottom of the client:
and then go to Voice & Video
and set the Output Device to "MacBook Pro Speakers". Or, if you're wearing headphones, set it to those! The important thing is that you DON'T set your output device to anything that's directing audio to BlackHole, since that will produce an echo. Your configuration should look something like this:
LOUDRED! LOUDRED!
This is it, the last step! Rename config.copy.js
to config.js
. So far so good, but we need to add our client token. Go back to your bot's page in the Discord developer portal you created earlier and click the "Copy" button. Then, in config.js
, change the value of the DISCORD_CLIENT_TOKEN
variable from YOUR CLIENT TOKEN HERE
to the token you copied.
NOTE: While you're here, feel free to customize anything else about the bot! The names, descriptions, and messages are all customizable.
Now you're ready to run the program! Run this command in your terminal:
npm start
You should be met with the following options:
Select "BlackHole 16ch". If everything went well, you should see the message "ready" in your terminal.
Loudred! Loudred! Loud!
And that's it! You should be able to use Loudred in your Discord Server. Type @loudred IChooseYou
so that it starts listening for commands from your server. You should get a list of all the commands it can use.