Skip to content

Repository files navigation

Miana — Discord Meeting Recorder Bot

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.

Features

  • /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

Architecture

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)

Quick Start (Local)

Prerequisites

  • Node.js 20+
  • Python 3.11+
  • Docker + Docker Compose
  • FFmpeg
  • A Discord bot token (Discord Developer Portal)
  • An OpenAI API key

1. Clone and configure

cp .env.example .env
# Edit .env with your DISCORD_TOKEN, DISCORD_CLIENT_ID, OPENAI_API_KEY, etc.

2. Start infrastructure

docker compose up postgres redis -d

3. Register slash commands

cd apps/bot
npm install
npm run deploy-commands

4. Start services

# 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

Railway Deployment

  1. Push this repo to GitHub
  2. Create a new Railway project → Deploy from GitHub repo
  3. Add services:
    • bot → Dockerfile: docker/bot.Dockerfile
    • api → Dockerfile: docker/api.Dockerfile
    • worker → Dockerfile: docker/worker.Dockerfile
  4. Add Railway addons:
    • PostgreSQL
    • Redis
    • Volume (mount at /data/audio for api + worker)
  5. Set environment variables for each service (see .env.example)
  6. Deploy

Discord Bot Permissions

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

Environment Variables

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

Cost Estimate

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

Privacy

  • 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 /record command

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages