RudeDiscordBot is a Discord bot written in C# using Discord.Net, designed to engage users in both text and voice channels with a default rude personality. It leverages ChatGPT for conversational capabilities and Microsoft Azure Speech services for voice interactions.
- Text Channel Interactions: Communicate with the bot in text channels where it responds using a rude personality by default.
- Voice Channel Interactions:
- Automatically joins voice channels when a user connects.
- Uses Microsoft Azure Speech-to-Text for listening and Windows TTS for responses.
- Automatically leaves when no users remain in the channel.
- Image and Embed Recognition: The bot can process images and embeds from discussions.
- Personality Customization:
- Use
/personality [personality]
to switch between 'Rude' and 'Helpful' in text channels. - Use
/voicepersonality [personality]
for voice channels. - Personality changes reset the conversation context.
- Use
- Voice Commands:
/joinvoice
to make the bot join your current voice channel./leavevoice
to make the bot leave the voice channel.
- Discord Bot Token: Requires a bot token with MESSAGE CONTENT INTENT enabled.
- OpenAI API Key: For conversation capabilities.
- Azure API Key: For speech-to-text functionality. Note: Azure's free tier allows only one active speech-to-text instance at a time.
- Windows Only: Utilizes Windows TTS, so the chosen voice must be installed on your PC.
Use the App.config
file to set the following:
DiscordToken
: Your Discord bot token.OpenAiKey
: Your OpenAI API key.SpeechToTextKey
: Your Azure subscription Speech-to-Text API key.SpeechToTextRegion
: The Azure region for your Speech-to-Text service.SpeechLanguageCode
: Language code for speech recognition (e.g., en-US).TtsVoice
: The Windows system TTS voice name.
- Ensure all dependencies and required tokens are set in
App.config
. - TTS Voice: Ensure the chosen TTS voice is installed on your PC and matches the language you intend to use. Note that Microsoft David Desktop is usually installed by default on Windows for English language support.
- Download the required native libraries (
libsodium
andopus
):- After building your bot, place these libraries in the runtime directory where your bot executable runs. Precompiled binaries for Windows are available here.
- Rename
libopus.dll
toopus.dll
.
- Run the bot and allow up to an hour for Discord command registration.