A Discord bot that joins voice channels, records meetings, transcribes Urdu/English speech via OpenAI Whisper, and generates AI-powered meeting notes using GPT-4o-mini.
/record— Join a voice channel and start recording (per-user audio streams)/stop— Stop recording and process the audio/status— Check current recording status/transcript <session_id>— Retrieve a previous session's info/delete <session_id>— Delete audio and transcript data- Urdu/English/mixed language support
- Speaker-labeled transcript with timestamps
- AI-generated: summary, key decisions, action items, discussion points, risks/blockers
- Output formats:
.md,.txt,.json - Automatic audio cleanup after 24 hours
bot/ TypeScript + discord.js + @discordjs/voice
api/ Python FastAPI — session management + transcript retrieval
worker/ Python — audio processing + transcription + summarization
Services communicate via:
- Redis (BullMQ) — job queue between bot and worker
- PostgreSQL — session metadata, participants, transcript segments, action items
- Shared volume — audio files (Railway volume)
- Node.js 20+
- Python 3.11+
- Docker + Docker Compose
- FFmpeg
- A Discord bot token (Discord Developer Portal)
- An OpenAI API key
cp .env.example .env
# Edit .env with your DISCORD_TOKEN, DISCORD_CLIENT_ID, OPENAI_API_KEY, etc.docker compose up postgres redis -dcd apps/bot
npm install
npm run deploy-commands# Terminal 1 — Bot
npm run bot
# Terminal 2 — API
cd apps/api
pip install -e .
uvicorn app.main:app --reload
# Terminal 3 — Worker
cd apps/worker
pip install -e .
python -m app.worker- Push this repo to GitHub
- Create a new Railway project → Deploy from GitHub repo
- Add services:
- bot → Dockerfile:
docker/bot.Dockerfile - api → Dockerfile:
docker/api.Dockerfile - worker → Dockerfile:
docker/worker.Dockerfile
- bot → Dockerfile:
- Add Railway addons:
- PostgreSQL
- Redis
- Volume (mount at
/data/audiofor api + worker)
- Set environment variables for each service (see
.env.example) - Deploy
Required bot permissions (OAuth2 scopes):
bot+applications.commands- Bot permissions:
Send Messages,Embed Links,Attach Files,Connect,Speak,Use Voice Activity
Required gateway intents:
GUILDS,GUILD_VOICE_STATES,GUILD_MESSAGES,MESSAGE_CONTENT
| Variable | Description | Required |
|---|---|---|
DISCORD_TOKEN |
Bot token from Discord Developer Portal | ✅ |
DISCORD_CLIENT_ID |
Application client ID | ✅ |
DISCORD_GUILD_ID |
Test guild ID for instant command registration | Optional |
OPENAI_API_KEY |
OpenAI API key for Whisper + GPT | ✅ |
DATABASE_URL |
PostgreSQL connection URL | ✅ |
REDIS_URL |
Redis connection URL | ✅ |
INTERNAL_API_SECRET |
Shared secret between bot and API | ✅ |
API_BASE_URL |
URL of the API service | ✅ |
AUDIO_STORAGE_PATH |
Where to store audio files | Optional |
AUDIO_RETENTION_HOURS |
Hours to keep raw audio (default: 24) | Optional |
| Service | Cost |
|---|---|
| Railway (bot + api + worker) | ~$5–10/month |
| OpenAI Whisper | ~$0.006/min of audio |
| OpenAI GPT-4o-mini | ~$0.01–0.05 per meeting |
| Typical 30-min meeting | ~$0.20–0.25 |
- The bot posts a visible consent message before recording begins
- Raw audio is deleted after 24 hours by default
- Users can delete their session at any time with
/delete - The bot never joins a channel without an explicit
/recordcommand