m13253 / discord-mic-bot

Discord bot to connect to your microphone―and you can have stereo sound

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

discord-mic-bot

Discord bot to connect to your microphone―and you can have stereo sound

Screenshot

Description

Discord transmits only mono sound to voice channel, which makes it a bad experience if you want to sing karaoke or play an instrument in a voice party. However, bot can transmit stereo sound to voice channel. Thus, you can connect to your party channel as a bot. (You will need an admin to approve.)

Hey Discord developers, listen to these feedbacks! Shame on you!

Installation

First, you need to install Python 3.10 or later version and download discord-mic-bot.

Then, in terminal or command prompt, type:

cd /path/to/discord-mic-bot
pip3 install -r requirements.txt --upgrade

If fail to install PyNaCl or NumPy on Windows, you may need to temporarily downgrade to Python 3.8 until those problems are fixed.

If on Linux, you also need to install libopus and libportaudio.

Obtaining a bot token

You need to obtain a bot token to log into Discord's server.

  1. Go to https://discord.com/developers/applications and click on "New Application".

  2. Inside the settings panel of your new application, click on "Bot".

  3. Create a new bot. When asked about permissions, simply leaving blank is enough.

  4. Click on "Copy Token".

  5. Open the file named token.txt and paste your token inside that file.

Inviting the bot to a Discord server

Note: You need to have the permission to invite a bot to the destination server. If you don't have such a permission, the destination server will not be shown in step 4. You can also ask an administrator who has such a permission to help you invite your bot.

  1. Go to https://discord.com/developers/applications and click on your already created application.

  2. Click on "Copy Client ID".

  3. Go to

    https://discord.com/oauth2/authorize?client_id=<CLIENT_ID>&permissions=3145728&scope=bot
    

    (Replace <CLIENT_ID> with your Client ID)

  4. Choose your destination server. Then click "Authorize".

Usage

For Linux or macOS users, discord-mic-bot is the entry point.

For Windows users, discord-mic-bot.cmd is the entry point.

Monitoring loudness

The loudness meter is compatible to EBU R 128 / ITU-R BS.1770, showing the perceptible loudness for the last 0.4 seconds.

-70 ================================= -32 ============= -14 ==== -5 === 0 LUFS
 |                Blue                 |      Green      | Yellow | Red |
-70 ================================= -32 ============= -14 ==== -5 === 0 LUFS
  • The left end is calibrated to -70 LUFS.
  • Between blue and green is -32 LUFS.
  • Between green and yellow is -14 LUFS.
  • Between yellow and red is -5 LUFS.
  • The right end is calibrated to 0 LUFS.

For music streaming, it is recommended to aim for -14 LUFS.

But if you are playing the background music while people are speaking, try to lower down an extra 20 dB. (i.e., aim for -34 LUFS.)

This widget is designed to only give you a rough intuition of your loudness. If you want to seriously measure your outgoing signal, try Youlean Loudness Meter (shareware) for Windows and macOS or ebumeter for Linux.

My live-loudness-normalizer plugin can also help you manage your stream loudness in realtime.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

You should have received a copy of the GNU General Public License along with this program.

Acknowledgment

This program is inspired by (but not a fork from) discord-audio-pipe. Thank you QiCuiHub!

About

Discord bot to connect to your microphone―and you can have stereo sound

License:GNU General Public License v3.0


Languages

Language:Python 99.9%Language:Shell 0.1%Language:Batchfile 0.1%