Download the latest release of the ElevenlabsTTSBot and extract the folder to your preferred location.
Go to the Discord Developer Portal.
- Click New Application
- Set a name for your bot and accept the T&C
- Set an avatar for your bot if you like
- Go to the "Bot" tab
- Scroll down to "Privileged Gateway Intents" and enable all three options
- Scroll back up and select "Reset Token" to show your bot token, you will need this for the bot data file
- Invite your bot by going to - discordapp.com/oauth2/authorize?client_id={CLIENT_ID}&scope=bot&permissions=35184408799232 Replace the {CLIENT_ID} including the brackets with the "Application ID" found under the "General Information" tab in your Application settings.
- Select which server you want to add the bot to.
- Update the discord_token field using the token you just got from the developer Portal
- Enabling developer mode to get the server ID. If you cannot find the ID of your server, you must go to user settings, scroll to "Advanced" under "App Settings" and enable Developer mode. After doing this, simply right click your server and select "Copy Server ID"
- Update the discord_server_id field with the ID of your server
- Update the elevenlabs_api_key field using the API Key found on your Elevenlabs.io profile.
- (Optional) Feel free to edit the other fields but make sure to keep the format as is
- Go to www.github.com/BtbN/FFmpeg-Builds/releases and download the latest gpl build for your system
- Open the Zipped folder and extract the "bin" folder to your preferred location, for example in the DiscordMadnessboard directory
- Open Windows System Properties and click the "Advanced" tab, and go to "Environment Variables"
- Click the "Path" System variable, "Edit", and "New". Here you will need to add the path to your /bin folder, which can quickly be found by right clicking the folder and going to properties
- Click OK and exit System Properties, FFMpeg is now ready to be used
- Go to the Python website and download the latest version of Python 3.11
- When installing, make sure to tick the "Add python.exe to PATH" box, or otherwise do the same as you did for FFMpeg by manually adding Python to path
- Navigate to the ElevenlabsTTSBot folder in your CLI of choice (such as Powershell)
- Tip: In Windows you can right click whilst in the folder and select "Open in Terminal"
- Type "pip install -r requirements.txt"
- Open Windows PowerShell as an Administrator
- Type "pip install discord"
- Type "pip install mutagen"
- Type "pip install PyNaCl"
You can now run the TTS Bot by opening the bot.py file with Python. For troubleshooting you can run the file in debug mode using your developing environment of choice, such as VS Code. The currently available commands are as follows:
- quota - Displays your available character count
- voices - Displays the available AI voices
- unstable - tts with 0 stability for simplicity - !unstable (voice) (ttsmessage) | (voicename or random) (string)
- tts - tts with selected voice and stability - !tts (voice) (stability) (ttsmessage) | (voicename or random) (num 1-100) (string)
- random - uses a random voice with random stability - !random (ttsmessage) | (string)
- help
- stop
- join
- leave
- Create a new role (or use an old one) in your Discord guild under "Server Settings" - "Roles"
- Add users who will be welcomed to the role by clicking them, selecting "Roles" and applying the role to them
- Copy the Role ID from the Roles section in your server settings
- Update the "role_id" line in the botdata.json file with your role ID number
- Set the "leave_join_sounds" line to "True"
- (Optional) Change the stability to anything between 0.00 and 1.00 depending on preference! You can also add or remove bits that the bot may say using the "joinmessagesprefix" list etc.
- Go to [Elevenlabs Voice Library](https://elevenlabs.io/app/voice-library)
- Click "Add to VoiceLab" on your preferred custom voice
- Select the "VoiceLab" tab
- Copy the voice ID by clicking the button that says "ID"
- Paste the ID in the customvoices.json file with your name of choice (the name can be anything)
- Use the "custom" command to use a custom voice with the bot
- NOTE: You can only use custom voices added to your VoiceLab list, (max 3 by default)
- Improved performance of the main bot.py file
- Refactoring of code
- Updated voice request for the new ElevenLabs API
- Fixed crashes on bot startup
- Other QOL boring code stuff