This is a Discord bot that integrates with Google's Generative AI and Wit.ai to provide text and voice-based functionalities. The bot can generate responses based on text inputs, summarize user attitudes, join and leave voice channels, and transcribe speech from voice channels.
- Text Generation: Generate responses based on input text using Google's Generative AI.
- User Summarization: Summarize the attitude of a specified user.
- Voice Channel Interaction: Join and leave voice channels.
- Voice Transcription: Transcribe speech from the voice channel using Wit.ai.
- Python 3.8+
- Discord account and server
- Google Generative AI API key
- Wit.ai API key
-
Clone the repository:
git clone https://github.com/your-username/discord-ai-bot.git cd discord-ai-bot
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Create a
.env
file in the root directory and add your API keys and bot token:DISCORD_TOKEN=your-discord-bot-token GOOGLE_API_KEY=your-google-api-key WIT_API_KEY=your-wit-ai-api-key
-
Run the bot:
python bot.py
-
Add the bot to your Discord server using the OAuth2 URL generated in the Discord Developer Portal.
-
Generate Response:
/generate <text>
Generate a response based on the input text.
-
Summarize User:
/summariseme
Summarize the attitude of the user who invoked the command.
-
Join Voice Channel:
/join
Join the voice channel of the user who invoked the command.
-
Leave Voice Channel:
/leave
Leave the current voice channel.
-
Transcribe Speech:
/transcribe <seconds>
Transcribe speech from the voice channel for the specified number of seconds.
For any questions or feedback, please contact [email protected].