LexiBot is a Discord bot that transcribes and translates audio from videos into text. Users provide a video URL, and the bot:
- Downloads the video's audio.
- Transcribes the audio using OpenAI's Whisper AI model.
- Translates the transcription into the desired language using Google Translate.
- Sends the transcription and translation as downloadable
.txt
files in Discord.
- Slash command (
/lexibot
) for ease of use. - Supports multiple languages for translation.
- Handles large transcriptions and translations by saving them as
.txt
files. - Powered by Whisper AI for accurate transcription.
-
Clone the repository:
git clone https://github.com/Xerx81/Transcribe-X-Translate.git cd Transcribe-X-Translate
-
Create and activate virtual environment:
python3 -m venv .venv source .venv/bin/activate
For windows:
source .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Whisper and yt-dlp requires FFmpeg to work properly. Install here
-
Add your bot's token in the
.env
file:TOKEN=your_discord_bot_token
-
Run the bot:
python main.py
- Command:
/lexibot
- Parameters:
video_url
: URL of the video for transcription (e.g., YouTube link).translate_lang
: Language code for translation (e.g.,en
for English,fr
for French).
- Parameters:
- Transcription: Whisper AI by OpenAI.
- Translation: Google Translate API.
- Audio Download: yt-dlp.
- Discord Bot Framework: discord.py.