A Discord bot that listens to voice channels, transcribes speech using AssemblyAI Universal-3 Pro, and responds using DeepSeek AI.
- 🎤 Voice Transcription: Real-time speech-to-text using AssemblyAI Universal-3 Pro
- 🤖 AI Responses: Intelligent responses powered by DeepSeek API
- 💬 Conversation History: Maintains context across messages
- 🔧 Configurable: Easy setup with environment variables
!ask <question>- Ask DeepSeek a question!clear- Clear conversation history!model <name>- Change DeepSeek model!help- Show help message
!startvoice- Start listening to voice channel!stopvoice- Stop voice recording!voicehelp- Show voice commands help
pip install -r requirements.txtCopy .env.example to .env and fill in your values:
# Discord Bot Configuration
DISCORD_BOT_TOKEN=your_discord_bot_token
# DeepSeek API Configuration
DEEPSEEK_API_KEY=your_deepseek_api_key
DEEPSEEK_API_URL=https://api.deepseek.com/v1/chat/completions
DEEPSEEK_MODEL=deepseek-chat
# AssemblyAI Configuration
ASSEMBLYAI_API_KEY=your_assemblyai_api_key
# Voice Channel Configuration (Get these from Discord)
GENERAL_VOICE_CHANNEL_ID=your_voice_channel_id
GENERAL_TEXT_CHANNEL_ID=your_text_channel_id- Enable Developer Mode in Discord (User Settings → Advanced → Developer Mode)
- Right-click your voice channel → Copy ID
- Right-click your text channel → Copy ID
- Paste into
.envfile
python bot.py- Use
!startvoicecommand to begin listening - Speak in the configured voice channel
- Audio is streamed to AssemblyAI Universal-3 Pro for transcription
- Transcriptions appear in the text channel with 🎤 emoji
- DeepSeek automatically responds to transcriptions
- Use
!stopvoiceto stop recording
The bot uses AssemblyAI's Universal-3 Pro Streaming model with optimal settings:
- Model:
u3-rt-pro - Sample Rate: 16kHz
- Turn Detection: Punctuation-based
- min_turn_silence: 100ms
- max_turn_silence: 1000ms
.env file! It contains sensitive API keys.
- Python 3.8+
- Discord Bot Token
- DeepSeek API Key
- AssemblyAI API Key
- Voice and Text Channel IDs
MIT