A modern, robust Discord bot with music, AI, speech-to-text, and more. Designed for easy deployment as both a Python script and a Windows EXE.
- Music playback and playlist management
- AI chat (Ollama integration)
- Speech-to-text transcription (Whisper & Google Speech Recognition)
- Real-time voice channel transcription
- Voice message transcription
- Slash commands and modern Discord features
- Robust logging and error handling
git clone https://github.com/AferilVT/LuciaV1Py.git
cd LuciaV1Py
- Python 3.10+
- Install dependencies:
pip install -r requirements.txt
For speech-to-text functionality, install additional dependencies:
python install_speech_deps.py
Note for Windows users: You may need to install Visual C++ Build Tools for pyaudio:
- Download from Microsoft Visual Studio Build Tools
- Or use:
pip install pipwinthenpipwin install pyaudio
Create a .env file in the project root (next to README.md):
TOKEN=your_discord_bot_token_here
cd src
python main.py
- Use PyInstaller or your preferred tool to build an EXE from
src/main.py. - Place the EXE in any folder. The bot will always look for
.envand write logs in the project root.
- Logs are written to
logs/lucia.login the project root.
Transcribe an audio file or the most recent recording.
- Usage:
/transcribe [file] - File: Optional audio file attachment
- If no file provided, uses the most recent recording from
/record_start
Start real-time transcription in a voice channel.
- Usage:
/transcribe_live - Requirements: You must be in a voice channel
- Transcribes speech in real-time and posts to the text channel
Stop real-time transcription.
- Usage:
/transcribe_stop - Requirements: You must be in the voice channel being transcribed
Transcribe the most recent voice message in the channel.
- Usage:
/transcribe_voice_message - Automatically finds and transcribes voice messages from recent messages
Enable automatic transcription for all voice channels.
- Usage:
/auto_transcribe - Effect: Bot automatically starts transcribing when someone joins any voice channel
- Output: Sends transcriptions to the general text channel
Disable automatic transcription.
- Usage:
/disable_auto_transcribe - Effect: Stops automatic transcription for the server
Check current transcription status.
- Usage:
/transcribe_status - Shows: Auto-transcription status and active transcription channels
- Manual: Use
/transcribe_liveto start transcription in a specific voice channel - Automatic: Use
/auto_transcribeto enable automatic transcription for all voice channels - Output: All speech is transcribed and sent to text channels in real-time
- Automatically finds the best text channel to send transcriptions to
- Prioritizes channels named "general", "chat", or "main"
- Falls back to the first available text channel
- Shows the speaker's name with each transcription
- Format: Username: "What they said"
- Whisper (offline): High-quality transcription using OpenAI's Whisper model
- Google Speech Recognition (online): Fallback for when Whisper isn't available
- Start/stop transcription with simple commands
- Check status anytime with
/transcribe_status - Enable/disable automatic transcription per server
- Bot won't start? Check for errors in the console and
logs/lucia.log. - .env not found? Ensure
.envis in the project root, not insrcor the EXE folder. - No DM on startup? Check Discord permissions and your privacy settings.
- Speech recognition not working?
- Ensure you've run
python install_speech_deps.py - For Windows, install Visual C++ Build Tools
- Check that microphone permissions are enabled
- Ensure you've run
- Still stuck? Add more logging or contact the maintainer.
Happy hacking!