Telegram bot that transcribes voice messages, video notes, audio files, and music into text using Groq's Whisper API.
Send or forward any voice message, video note, audio track, or document to @egvoicebot to receive a transcription.
- Supports voice messages alongside any video file format.
- Uses Groq
whisper-large-v3for speech-to-text processing. - Interactive inline show/hide buttons for output text.
- Supports files up to 2GB via local Telegram Bot API server integration.
- Groq API Key
- Telegram Bot Token
-
Clone the repository:
git clone https://github.com/egraich/VoiceBot.git cd VoiceBot -
Create a
.envfile insideVoiceBot/:BOT_TOKEN=your_telegram_bot_token GROQ_API_KEY=gsk_your_groq_api_key_here ADMIN_ID=your_admin_id TEMP_DIR=path/to/temp/files/directory BOT_API_URL=https://api.telegram.org
-
Install requirements:
pip install -r requirements.txt
-
Run VoiceBot:
python main.py
- Media Ingestion & Audio Extraction: Incoming files are downloaded locally. Video files are converted to 16kHz mono FLAC via FFmpeg before sending to the API.
- Transcription: Audio files are transmitted asynchronously to the Groq Cloud API using the
whisper-large-v3model. - Storage & Local API: Connecting the bot to a local Telegram Bot API server removes the default 20MB file size ceiling, allowing uploads up to 2000MB. Caching and stats are stored in SQLite database file via
aiosqliteusingPRAGMA journal_mode=WALto handle concurrent operations without database locks.
- Aiogram 3 — Async Telegram Bot API framework.
- Groq API — Fast speech recognition endpoint.
- FFmpeg — Multimedia processing framework.
- aiosqlite — Async SQLite libriary for Python.
Made by egraich