A Telegram bot that downloads TikTok and Instagram videos and transcribes their audio — 100% free, runs locally using OpenAI Whisper.
- User sends a TikTok or Instagram link to the bot
- Bot downloads the audio using yt-dlp (free, open source)
- Bot transcribes it using OpenAI Whisper (runs on your machine, no API key needed)
- Bot replies with the transcription text
- Python 3.9+
- ffmpeg installed on your system
- A Telegram Bot Token (free, from @BotFather)
Ubuntu/Debian:
sudo apt install ffmpegmacOS:
brew install ffmpegWindows: Download from https://ffmpeg.org/download.html and add to PATH.
- Open Telegram and search for @BotFather
- Send
/newbot - Follow the prompts to name your bot
- Copy the API token you receive
# Clone or download this project
cd tiktok_ig_transcriber_bot
# Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install Python packages
pip install -r requirements.txt
⚠️ First install will download PyTorch (~1GB). This is a one-time download.
# Copy the example env file
cp .env.example .env
# Edit .env and add your bot token
# TELEGRAM_BOT_TOKEN=123456789:ABCdef...Then load it before running:
# Linux/Mac
export TELEGRAM_BOT_TOKEN="your_token_here"
# Windows (Command Prompt)
set TELEGRAM_BOT_TOKEN=8613704159:AAGxAKLobIzv6lRawRkilGc-hyUoVmrBG0M
# Windows (PowerShell)
$env:TELEGRAM_BOT_TOKEN="your_token_here"python bot.pyYou should see:
INFO - Whisper model loaded.
INFO - Bot is running...
Now open Telegram, find your bot, and send it a TikTok or Instagram link!
# Build the image (includes ffmpeg + pre-downloaded Whisper model)
docker build -t transcriber-bot .
# Run it
docker run -e TELEGRAM_BOT_TOKEN="your_token_here" transcriber-bot| Environment Variable | Default | Description |
|---|---|---|
TELEGRAM_BOT_TOKEN |
(required) | Your bot token from BotFather |
WHISPER_MODEL |
base |
Whisper model size (see below) |
| Model | RAM needed | Speed | Accuracy |
|---|---|---|---|
tiny |
~1 GB | Fastest | Basic |
base |
~1 GB | Fast | Good ✅ |
small |
~2 GB | Medium | Better |
medium |
~5 GB | Slow | Great |
large |
~10 GB | Slowest | Best |
For most use cases, base is the sweet spot.
Want to run this 24/7 for free?
- Render.com — Free tier, deploy with Docker
- Railway.app — Free tier available
- Fly.io — Free tier with enough resources for
tiny/basemodel - Oracle Cloud Free Tier — Permanent free VMs (ARM, 4 cores, 24GB RAM)
- Your own PC/Raspberry Pi — Run it at home
⚠️ Note: Cloud free tiers often have limited RAM. UseWHISPER_MODEL=tinyfor tighter limits.
- Private videos cannot be downloaded (must be public)
- Instagram sometimes blocks downloads depending on the account's privacy settings
- Very long videos (10+ min) may take a few minutes to transcribe
- TikTok occasionally changes its download mechanism; update yt-dlp if issues arise:
pip install -U yt-dlp
| Package | Purpose | Cost |
|---|---|---|
python-telegram-bot |
Telegram bot framework | Free |
yt-dlp |
Download TikTok/IG video/audio | Free |
openai-whisper |
Speech-to-text transcription | Free (runs locally) |
ffmpeg |
Audio processing | Free |