https://github.com/xerx81/transcribe-x-translate
LexiBot is a Discord bot designed to transcribe and translate audio from video URLs. With support for Whisper AI and Google Translate, this bot can convert speech from videos into text and translate it into a target language.
https://github.com/xerx81/transcribe-x-translate
Last synced: 3 months ago
JSON representation
LexiBot is a Discord bot designed to transcribe and translate audio from video URLs. With support for Whisper AI and Google Translate, this bot can convert speech from videos into text and translate it into a target language.
- Host: GitHub
- URL: https://github.com/xerx81/transcribe-x-translate
- Owner: Xerx81
- Created: 2025-01-27T08:39:33.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-28T08:19:55.000Z (5 months ago)
- Last Synced: 2025-01-28T08:25:23.217Z (5 months ago)
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# LexiBot - Discord Transcription & Translation Bot
---
## Overview
LexiBot is a Discord bot that transcribes and translates audio from videos into text. Users provide a video URL, and the bot:
1. Downloads the video's audio.
2. Transcribes the audio using OpenAI's Whisper AI model.
3. Translates the transcription into the desired language using Google Translate.
4. Sends the transcription and translation as downloadable `.txt` files in Discord.---
## Features
- 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.---
## Setup Instructions
1. Clone the repository:
```bash
git clone https://github.com/Xerx81/Transcribe-X-Translate.git
cd Transcribe-X-Translate
```2. Create and activate virtual environment:
```bash
python3 -m venv .venv
source .venv/bin/activate
```
For windows:
```bash
source .venv\Scripts\activate
```
4. Install dependencies:
```bash
pip install -r requirements.txt
```5. Whisper and yt-dlp requires FFmpeg to work properly. Install [here](https://www.ffmpeg.org/download.html)
6. Add your bot's token in the `.env` file:
```
TOKEN=your_discord_bot_token
```7. Run the bot:
```bash
python main.py
```---
## Bot Command Details
- **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).---
## Credits
- **Transcription**: [Whisper AI](https://github.com/openai/whisper) by OpenAI.
- **Translation**: Google Translate API.
- **Audio Download**: yt-dlp.
- **Discord Bot Framework**: [discord.py](https://discordpy.readthedocs.io/).---
## Screenshot
---