Skip to content

Latest commit

 

History

History
436 lines (313 loc) · 16.5 KB

File metadata and controls

436 lines (313 loc) · 16.5 KB

ChatRobber — Capture. Summarize. Secure.

ChatRobber

Discord Voice & Text Conversation Logger + AI Summarizer

Joins your voice channel, transcribes everything everyone says, reads the VC text chat, and gives you organized AI-powered meeting notes — all from one slash command.


✨ Features

Feature Description
🎙️ Live Voice Transcription Transcribes every person in the voice channel separately in real time — handles people talking over each other
💬 VC Text Chat Monitoring Automatically reads the voice channel's built-in text chat (no extra setup)
🔀 Combined Timeline Voice and text are merged into one chronological transcript so nothing is out of order
📡 Periodic Live Updates Posts a quick "what's happening right now" summary at a regular interval (default: every 10 min)
⏱️ Configurable Summary Interval Set the live update interval from 1–60 minutes right in the slash command
📝 Full Narrative Summary When you stop, you get a detailed story-style writeup of the entire conversation
📋 Cliff's Notes 7 key takeaways + 6-sentence high-level + 15-sentence full summary
📥 Transcript Export Download the raw transcript as a Markdown .md file with /chatrobber transcript
👥 Speaker Stats See exactly how many voice utterances and text messages each person contributed
🛑 Auto-Stop on Empty Channel Bot automatically stops and generates reports if everyone leaves the voice channel (60 s grace period)
🔐 Ephemeral Responses All command responses are only visible to you — nobody else sees them

🧰 What You Need Before Starting

You need four things, all free (or nearly free). Here's exactly what they are and where to get them:

# What Where to get it Cost
1 Node.js (version 18 or higher) nodejs.org — click the big green "LTS" button Free
2 A Discord Bot Token Discord Developer Portal (full steps below) Free
3 A Deepgram API Key console.deepgram.com Free tier available
4 An OpenRouter API Key openrouter.ai/keys Pay per use — pennies per session

🚀 Setup (Step by Step)

Don't skip steps. Go in order. Each one takes a couple of minutes.

Step 1 — Install Node.js

  1. Go to https://nodejs.org
  2. Click the big green "LTS" button to download the installer
  3. Run the installer — click Next through every screen (all the defaults are fine)
  4. When it's done, open a terminal to make sure it worked:
    • Windows: Press Win + R, type cmd, press Enter
    • Mac: Open Terminal from Applications → Utilities
  5. Type this and press Enter:
    node --version
    
  6. You should see a version number like v20.x.x. If you get an error, restart your computer and try step 5 again.

Step 2 — Download ChatRobber

Option A — Download as ZIP (easiest):

  1. On the GitHub page, click the green "Code" button → "Download ZIP"
  2. Unzip the file to a folder you can find easily (like your Desktop)

Option B — Clone with Git (if you know what Git is):

git clone https://github.com/chchchadzilla/ChatRobber.git
cd ChatRobber

Step 3 — Install Dependencies

  1. Open a terminal / command prompt
  2. Navigate to the ChatRobber folder:
    • Windows: cd Desktop\ChatRobber (or wherever you put it)
    • Mac: cd ~/Desktop/ChatRobber
  3. Run:
    npm install
    
  4. Wait for it to finish. You'll see a new node_modules folder appear — that's normal.

Windows users: You can also just double-click the setup.bat file inside the ChatRobber folder. It does the same thing.


Step 4 — Create a Discord Bot

This is the longest step, but just follow the numbered list exactly:

Create the bot application:

  1. Go to https://discord.com/developers/applications
  2. Sign in with your Discord account if asked
  3. Click the blue "New Application" button (top right)
  4. Name it ChatRobber (or whatever you want) and click Create

Get your bot token:

  1. Click "Bot" in the left sidebar
  2. Click "Reset Token" → click "Yes, do it!"
  3. Copy the token that appears — paste it somewhere safe (Notepad, a sticky note, etc.). You will need it in Step 7.

⚠️ Never share your bot token with anyone. It's like a password for your bot.

Turn on required permissions:

  1. Scroll down on the Bot page to "Privileged Gateway Intents"
  2. Turn ON all three of these switches:
    • Presence Intent
    • Server Members Intent
    • Message Content Intent
  3. Click Save Changes at the bottom (don't skip this!)

Invite the bot to your server:

  1. Click "OAuth2" in the left sidebar
  2. Click "URL Generator"
  3. Under Scopes, check these two boxes:
    • bot
    • applications.commands
  4. Under Bot Permissions, check these boxes:
    • Send Messages
    • Attach Files
    • Embed Links
    • Read Message History
    • Connect (under Voice Permissions)
    • Speak (under Voice Permissions)
    • Use Voice Activity (under Voice Permissions)
  5. Copy the URL at the bottom of the page
  6. Open that URL in your browser
  7. Select your server from the dropdown and click Authorize

The bot will now show up in your server's member list (it will be offline — that's fine, we haven't started it yet).


Step 5 — Get a Deepgram API Key

Deepgram is the service that turns voice audio into text.

  1. Go to https://console.deepgram.com
  2. Create a free account (or sign in)
  3. In the dashboard, go to API Keys
  4. Click "Create a New API Key"
  5. Name it ChatRobber and click Create
  6. Copy the key — paste it somewhere safe!

💡 Deepgram's free tier gives you $200 in credit, which is enough for many hours of transcription.


Step 6 — Get an OpenRouter API Key

OpenRouter is the service that powers the AI summaries.

  1. Go to https://openrouter.ai
  2. Create an account (or sign in)
  3. Go to https://openrouter.ai/keys
  4. Click "Create Key"
  5. Copy the key — paste it somewhere safe!

💡 OpenRouter costs pennies. The Gemini 2.0 Flash model ChatRobber uses is extremely cheap — a multi-hour session might cost $0.01–$0.05.


Step 7 — Configure the Bot

Now you'll plug in the three keys you collected.

  1. Open the ChatRobber folder on your computer
  2. Find the file called .env.example
  3. Make a copy of that file and rename the copy to .env (just .env, nothing else)
    • Windows: Right-click the file → CopyPaste → right-click the copy → Rename → type .env
    • Mac/Linux terminal: cp .env.example .env
  4. Open the new .env file with any text editor (Notepad, TextEdit, VS Code — anything works)
  5. Replace the placeholder text with the keys you copied earlier:
DISCORD_TOKEN=paste_your_discord_bot_token_here
DEEPGRAM_API_KEY=paste_your_deepgram_api_key_here
OPENROUTER_API_KEY=paste_your_openrouter_api_key_here

Rules:

  • No quotes around the values
  • No spaces around the = sign
  • Each key goes on its own line
  • Save the file when you're done

Step 8 — Start the Bot

  1. Open a terminal / command prompt inside the ChatRobber folder
  2. Run:
    npm start
    
  3. You should see something like:
    [ChatRobber] ✅  Logged in as ChatRobber#1234
    [ChatRobber] ℹ️  Registering slash commands…
    [ChatRobber] ✅  Slash commands registered.
    

Congratulations — the bot is online! 🎉

To stop the bot at any time, press Ctrl + C in the terminal window.

The bot runs as long as the terminal window is open. Close the terminal = bot goes offline.


🎮 How to Use the Bot

Everything is controlled with a single slash command: /chatrobber

Start a Session

Type this in any text channel on your server:

/chatrobber start voice_channel:#your-vc output_channel:#summary-channel
Option Required? What it does
voice_channel ✅ Yes The voice channel to join. The bot listens to voice and automatically watches its built-in text chat.
output_channel ✅ Yes The text channel where live updates and final summaries will be posted.
chunk_interval No How often (in minutes) the bot posts live updates. Default is whatever SUMMARY_INTERVAL_MINUTES is in your .env (10 min by default). Accepts 1–60.

Example with custom interval:

/chatrobber start voice_channel:#General chunk_interval:5 output_channel:#meeting-notes

This starts monitoring #General voice, posting live updates every 5 minutes to #meeting-notes.

💡 Tip: Use a private channel for output_channel so summaries don't clutter public chat.

Check Status

/chatrobber status

Shows: how long the session has been running, how many voice utterances and text messages have been captured, and per-person speaker stats (who's talked the most).

Stop a Session

/chatrobber stop

This will:

  1. Disconnect from the voice channel
  2. Generate the full narrative summary of the combined conversation
  3. Generate the Cliff's Notes (7 takeaways + summaries)
  4. Post everything to the output channel
  5. Let you know you can download the transcript with /chatrobber transcript

Download the Transcript

/chatrobber transcript

Sends you a .md (Markdown) file containing the full raw transcript from the last session — every voice utterance and text message, in chronological order, with timestamps and speaker names. Great for archiving or searching later.

The transcript is saved until you start a new session or restart the bot.


📤 What the Output Looks Like

During the session (periodic live updates):

📡 Live Update — Interval #3 The group has shifted to discussing deployment options. John proposed containerizing the app. Sarah flagged cost concerns with the current cloud provider.

⏱️ 30m 0s into the session

When you stop the session:

Full Summary:

📄 Conversation Summary The meeting began with John presenting the quarterly results. Revenue was up 15%. The team then discussed deployment strategies, with Sarah explaining the cost tradeoffs… (detailed narrative covering the entire voice + text conversation)

Cliff's Notes:

📋 Cliff's Notes

🔑 7 KEY TAKEAWAYS:

  1. Revenue is up 15% quarter-over-quarter
  2. Docker was chosen for deployment (etc.)

📋 HIGH-LEVEL SUMMARY (6 sentences): (concise overview)

📝 FULL SUMMARY (15 sentences): (thorough overview)


⚙️ Optional Configuration

You can tweak these in your .env file. All of them are optional — the defaults work great.

Setting Default What it does
SUMMARY_INTERVAL_MINUTES 10 How often live updates are posted (in minutes). Can also be overridden per session with the chunk_interval option.
CHUNK_MODEL google/gemini-2.0-flash-001 AI model used for periodic chunk summaries
FINAL_MODEL google/gemini-2.0-flash-001 AI model used for the final narrative summary
DEEPGRAM_MODEL nova-3 Deepgram speech-to-text model
DEEPGRAM_LANGUAGE en Language code for speech recognition
DEBUG false Set to true for verbose console log output

📁 Project Structure

ChatRobber/
├── .env.example          ← Template for your config (copy this to .env)
├── .env                  ← Your actual config (you create this)
├── package.json          ← Project info & dependencies
├── setup.bat             ← Windows quick-install script (double-click)
├── setup.sh              ← Mac/Linux quick-install script
├── img_assets/           ← Branding images
├── src/
│   ├── index.js          ← Entry point — starts the bot
│   ├── config.js         ← Loads & validates environment settings
│   ├── bot.js            ← Discord client, slash commands, event handlers
│   ├── session.js        ← Core session manager (voice + text + summaries)
│   ├── services/
│   │   ├── openrouter.js     ← OpenRouter API client
│   │   ├── summarizer.js     ← AI prompts & summarization logic
│   │   └── transcriber.js    ← Per-user Deepgram live transcription
│   └── utils/
│       ├── embeds.js         ← Discord embed builders (formatting)
│       └── logger.js         ← Console logging helper

🔧 Troubleshooting

"Missing required environment variables"

You didn't create a .env file, or it's missing one of the three required keys.

Fix: Make sure you have a file called .env (not .env.example) in the ChatRobber folder with all three keys filled in. See Step 7 above.

"Could not join the voice channel"

The bot doesn't have permission to enter the voice channel.

Fix: In Discord, go to the voice channel's settings → Permissions → make sure the bot (or its role) has Connect and Speak enabled.

Bot is online but slash commands don't show up

Discord can take up to an hour to sync slash commands globally.

Fix: Wait a few minutes and try again. If it still doesn't work, kick the bot from your server and re-invite it using the URL from Step 4 (make sure applications.commands is checked under Scopes).

No voice transcriptions appearing

Either nobody is speaking, or there's a Deepgram issue.

Fix: Check the terminal for error messages. Make sure your Deepgram API key is valid and has credits (check at console.deepgram.com).

"OpenRouter API error"

Your OpenRouter key may be invalid or out of credits.

Fix: Check your balance and key at openrouter.ai/keys.

Bot disconnects from voice randomly

This usually means a network hiccup.

Fix: Just start a new session with /chatrobber start. If it keeps happening, check your internet connection.

No text messages being captured

People might be typing in the wrong channel.

Fix: Make sure people are using the voice channel's built-in text chat (click the chat icon while in the VC), not a separate text channel. ChatRobber monitors the VC's own text chat automatically.

Bot stops by itself and says "auto-stopped"

Everyone left the voice channel and nobody came back within 60 seconds.

Fix: This is intended behavior — the bot cleans up after itself when the channel empties. Just start a new session when you're ready.


🏗️ How It Works (Under the Hood)

Per-User Audio Streams — Discord sends a separate audio stream for each person in the voice channel. ChatRobber runs an independent Deepgram transcription for each user, so overlapping speech is captured cleanly.

Combined Timeline — Voice utterances (🎙️) and text messages (💬) are interleaved into a single chronological transcript. This gives the AI the full picture of the conversation, not two disconnected halves.

Chunked Summarization — Every N minutes, the latest slice of transcript is summarized into a "chunk". When you stop, all chunks are fed to the AI to produce the final narrative. This keeps token costs low even for long sessions.

Auto-Stop — The bot watches for voiceStateUpdate events. If the voice channel becomes empty, a 60-second grace period starts. If someone rejoins, it cancels. If nobody comes back, the bot auto-stops and posts the final reports.


📜 License

MIT — do whatever you want with it.