DEV Community

VANGAPANDU LOKESWARA KARTHIK
VANGAPANDU LOKESWARA KARTHIK

Posted on AI-assisted

StandIn: the lazy CR's AI assistant that answers class notes and deadlines in my cloned voice

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission πŸ¦₯

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

It's 1:47 AM before our Power System Protection internal. My phone buzzes: "Bro, send unit 5 circuit breakers notes." Then: "When is the lab report due?"

I'm the CR of our 6th-sem EEE class, and this happens before every test. StandIn is a Telegram assistant that answers these for me: it sends the right Drive link, answers deadlines only from notices I've approved, and replies with a voice note in an AI clone of my voice. So I can sleep.


What I Built:

StandIn does three things, and nothing else:

  1. Delivers Drive links for requested notes: When a classmate asks for a subject or topic (by text or voice message), it searches our 6th-sem Drive catalog using typo-tolerant matching and sends the direct Google Drive link.
  2. Answers deadline and timetable questions without guessing: It answers questions about exam commencement dates and assignment deadlines strictly from verified notices saved in class memory. If something has not been announced, it says so instead of inventing a date.
  3. Turns circulars into class announcements. I paste a faculty circular into a dashboard on my laptop. Local Gemma 3 4B writes a clean title, a few bullet points and a short voice script, with a rule-based fallback if it's slow. I read the preview, listen to it in my cloned voice, and confirm. Then it goes to authorized students on Telegram, with an AI-clone disclosure. ## Who uses it and what effort it saves It's built for my 30 classmates in 6th Sem EEE. It saves me from searching Drive folders on my phone, retyping exam schedules, and answering the same DMs late at night. So far I've tested it with 2 classmates. In those tests:
  4. Notes requests like "circuit breakers", "psp unit 2" and "fuses" returned the closest-matching Drive link.
  5. Questions about our exam schedule were answered from the notices I saved (Second Mid on 16-11-2026, Practical Exams on 07-12-2026).
  6. A request for something that wasn't in the catalog got a clear "I couldn't find that one" text with our root Drive link, and no voice note.

Demo

What the video shows: a classmate asks for notes and gets Drive links plus a voice note, a typo still finds the right file, an unannounced deadline gets an honest "I don't know", and I turn a messy circular into an announcement, preview it, and send it to the class.

Try the bot: @standin_cr_eee_bot. It's private to my 6th-sem EEE class, so it asks for a class passcode. The video shows everything it does. If you're a judge and want to try it, tell me in the comments and I'll share a test code.

Note: StandIn runs on my own laptop. The local Gemma 3 4B model and the Telegram listener only work while my laptop is on and connected, so the bot may be offline when you try it.

Screenshots

Code :

GitHub logo Karthik-vangapandu8 / standln

My project for Week3 hacktoberfest 2026

πŸ¦₯ StandIn β€” Autonomous AI Class Representative Surrogate

"Be lazy where it counts: let your AI clone answer repetitive classmate DMs, broadcast lecture shifts, and deliver study materials while you sleep in."

Hacktoberfest 2026 Theme: Slow and Steady Model: Gemma 3:4B TTS: ElevenLabs Flash v2.5 Telegram: Live Bot License: MIT


πŸ“Œ What is StandIn?

Being an engineering Class Representative (CR) is exhausting. Every single day, your phone is bombarded with dozens of repetitive messages:

  • "Bro, send unit 5 circuit breakers notes"
  • "Where is the verilog lab manual drive link?"
  • "When is the lab report due? What room is tomorrow's class?"

StandIn is an open-source, autonomous AI surrogate for the Class Representative. Connected directly to an official Telegram Bot (@standin_cr_eee_bot), StandIn:

  1. Understands Natural Student Queries: Handles rushed typos on mobile keypads (e.g. "send me verliog programs pdf") using fuzzy Damerau-Levenshtein matching.
  2. Delivers Real 6th Sem Course Drives: Directly links exact Google Drive folders and files across subjects (Power System Protection, Power Electronics, VLSI Lab, Embedded IoT…

Run it yourself πŸ› οΈ

You'll need Node.js 18+, Ollama, a Telegram bot token from @BotFather, and an ElevenLabs API key.

# 1. Get the code
git clone https://github.com/Karthik-vangapandu8/standln.git
cd standln
npm install

# 2. Pull the open-weight model (runs locally)
ollama pull gemma3:4b

# 3. Configure
cp .env.example .env
# Fill in: TELEGRAM_BOT_TOKEN, TELEGRAM_BOT_USERNAME, ELEVENLABS_API_KEY,
# ELEVENLABS_VOICE_ID, CLASS_PASSCODE, DRIVE_HUB_URL

# 4. Start the bot and the dashboard
npm start
Enter fullscreen mode Exit fullscreen mode

Then open your bot in Telegram and send /whoami. Copy the number it replies with into .env as CR_CHAT_ID, and restart. From now on only you can post announcements.

  • Dashboard (announcement studio): http://localhost:3000
  • Bot: send the class passcode once, then ask for psp unit 2 notes, fuses, or when is the lab report due?

What each file does πŸ“‚

File Job
server/index.js Starts the web server and the Telegram bot, and handles the dashboard's announcement routes
server/telegram_bot.js The front door: passcode gate, cooldown, voice-note cap, voice transcription, routing, and text-then-voice delivery
server/drive_search.js Typo-tolerant (Damerau-Levenshtein) search over the Drive catalog, so "verliog" still finds Verilog
server/announcements.js Saves approved notices and answers deadline questions only from them ("I don't have an official announcement on that yet" if none)
server/circular_digest.js Sends a pasted circular to local Gemma 3 4B for a clean title, bullets, link and voice script, with a rule-based fallback if Gemma is slow
server/elevenlabs.js Voice synthesis (Flash v2.5), transcription (Scribe), and disk caching of repeated scripts
server/file_search.js Optional fallback that finds PDFs in a local materials/ folder
public/ The announcement studio dashboard (index.html, app.js, style.css)
data/drive_catalog.json Subjects, units and Drive links the bot searches (replace with your own)
data/announcements.json Saved class notices (created at runtime)

Quick tests πŸ§ͺ

npm start                      # server + bot, watch the terminal logs
# In Telegram, after sending the passcode:
#   "psp unit 2"                -> Drive links for Unit 2
#   "when is the viva?"         -> "I don't have an official announcement on that yet"
# In the dashboard: paste a circular -> Generate preview -> listen -> Confirm
Enter fullscreen mode Exit fullscreen mode

How I Built It:

1. The front door πŸšͺ

Everything starts on Telegram. Classmates can type, or send a voice note at 2 AM when they'd rather not type. Before the bot does any work, each message goes through four quick checks:

Check What it does
πŸ”‘ Passcode gate StandIn is private to our 6th Sem EEE class. A student sends the class passcode once, and the bot remembers their chat ID. It never shows or repeats the passcode.
⏱️ Cooldown A 4-second cooldown per student stops double-taps and spam.
πŸŽ™οΈ Daily voice cap Each student gets up to 15 voice-note replies a day. Past that, the bot keeps answering in text, which protects my ElevenLabs credits.
πŸ“ Voice-note transcription If a classmate sends a voice message, the bot downloads it from Telegram and sends it to ElevenLabs Scribe (scribe_v1) to turn it into text.

After transcription, the bot replies with "You said: ..." so the student can spot a mishearing. The text then moves on to the next step.

2. Finding the answer πŸ”

When a student asks for something, the bot decides what kind of question it is and looks in the right place. None of this uses a language model, because a model can make up a convincing but broken Drive link at 2 AM. Plain code can only return links that really exist in our catalog.

What are they asking about?

  • πŸ“… A deadline or schedule β†’ the bot looks in the class notices I've approved and saved. Specific questions like "when are practicals?" or "when is second mid?" get extra weight, so the student sees the exact date and not a whole calendar. If nothing has been announced, the bot says so and doesn't guess.
  • πŸ“š Study material β†’ the bot searches our 6th-sem Drive catalog, which I organised by hand, using typo-tolerant Damerau-Levenshtein matching. Messy requests like "psp unit 2", "fuses" or "vlsi lab" map to real folder and file links.

If the match is uncertain, the reply says "closest match", and the student can ask again with more detail.

Not on Drive yet? The bot can also check a materials folder on my laptop and attach the PDF. This only works while my laptop is on.

3. Delivery in two steps πŸ“¨

Step 1, text first. The student gets the Drive link within a second or two. If Telegram rejects some formatting character, the bot resends the message as plain text, so a reply is never silently lost.

Step 2, then the voice note. While they're reading, ElevenLabs Flash v2.5 (eleven_flash_v2_5) makes a short reply in my cloned voice.

Two details I care about:

  • 🏷️ It says what it is. Every voice note opens with "Hey, this is an AI clone of Karthik's voice...", so nobody mistakes it for me.
  • πŸ’Ύ Repeats are free. Audio is cached on disk by script. If ten students ask for the same Unit 2 notes before an exam, the audio is generated once and reused for the other nine.

4. The announcement studio πŸ“’ (Gemma 3 4B, local)

Faculty circulars arrive as long, messy WhatsApp or email text. I paste one into my dashboard, and the studio:

  1. Cleans it up: strips email headers, sender lines and clutter.
  2. Drafts the announcement: Gemma 3 4B, running locally through Ollama, writes a short title, a few bullet points, the main link, and a friendly voice script. If Gemma takes longer than 12 seconds, a simple rule-based version takes over, so the dashboard never hangs.
  3. Keeps links readable: the link stays clickable in the text, and the voice version says "check the link in the message" instead of reading out a URL.

I read the result and listen to the voice preview. Only after I approve does it go to the whole class. Gemma prepares the draft, and I decide.

What's open and what's closed

Piece What it does Open or closed
Gemma 3 4B (via Ollama, gemma3:4b) Turns messy circulars into a clean title, bullets, link and voice script for me to review Open-weight, runs on my laptop
ElevenLabs Flash v2.5 Speaks replies and announcements in my cloned voice Closed, paid
ElevenLabs Scribe (scribe_v1) Turns classmates' voice notes into text Closed, paid
Telegram Bot API Delivers messages, voice notes and links Closed platform, free
Plain code Passcode gate, intent routing, fuzzy Drive search, deadline lookup, caching My own code

The WhatsApp failure and the move to Telegram:

I initially tried automating WhatsApp Web using Browserbase and Playwright to reply to DMs. It failed in practice: QR session tokens frequently expired, headless browser sessions hung, and automating a personal WhatsApp account risks permanent account bans from Meta.
I scrapped the browser approach and switched to an official Telegram bot using long polling. It eliminated all browser fragility, provided instant delivery, and natively supported voice notes (sendVoice) and audio downloads without extra infrastructure.

Real bugs I hit while building πŸ›

  1. The gate leaked the passcode. The first version of the "passcode required" message printed the code itself, which defeated the whole gate. I removed it and now tell students to ask the CR.
  2. Typos broke Drive search. A classmate typed verliog programs pdf. Exact matching failed because of the typo, and pdf was a stop-word. Damerau-Levenshtein matching fixed it, and verliog now finds the Verilog programs.
  3. Telegram rejected messages with underscores. Names or transcribed text like unit_5_notes triggered a 400 error from Telegram's Markdown parser. I added an md() escape helper and a fallback that resends the message as plain text.
  4. "Hi" triggered a voice note. A plain greeting used to fall through to the default Drive link and spend ElevenLabs credits. isPureGreeting() now answers with an instant text menu.

Why Does Open Innovation Matter?

No per-token bill for a student project. If 30 classmates each ask ten questions a day before midterms, a paid LLM API becomes a monthly cost I can't justify for a free class helper. Gemma 3 4B, an open-weight model, runs on my laptop through Ollama with no per-token fees, and it drafts my announcements.

I decide what leaves my machine. Announcement text is processed locally, and the bot answers deadline questions only from notices I approved, never from model guesses. To be precise about the limits: messages travel through Telegram, and the text I choose to voice (and any voice notes classmates send) goes to ElevenLabs. No student message is sent to a cloud LLM.

The open part keeps working if the closed part goes away. ElevenLabs gives me the natural cloned voice, and it's the one closed, paid piece. It's optional: with no key, typed requests still get Drive links and deadline answers as text. (Voice-message input also needs ElevenLabs.)

Inspectable and changeable. Because the weights run on my own machine, I can read the prompts, tune the draft for how our professors write circulars, and run that step offline.

The Lazy Payoff

I built this over a few days, so my testing was small: 2 classmates sent real requests while I watched.

  • 17 requests were answered by the bot on its own: 10 notes requests, 5 deadline questions, and 2 things it couldn't find.
  • ~1.2 seconds: average time for the text reply with the Drive link, measured in those tests. The voice note follows a few seconds later.
  • 0 notes or deadline requests I had to answer by hand since I switched StandIn on.
  • Honest limit: this isn't enough to know how it holds up under real load. The real test is our Second Mid on 16 November, when the whole class will use it.

Prize Categories

Best Use of ElevenLabs
StandIn uses ElevenLabs on both sides of the conversation:

  • Voice in: Scribe (scribe_v1) transcribes classmates' Telegram voice notes, so someone can ask for notes by speaking.
  • Voice out: Flash v2.5 (eleven_flash_v2_5) speaks every reply and every class announcement in a clone of my own voice, as a Telegram voice note. Each one says it is an AI clone of my voice.
  • Announcements still need my approval: I check a text and audio preview before anything goes to the class.

Top comments (1)

Collapse
 
harsha_pentakota profile image
Harsha Vardhan Pentakota • • Edited

Great Project!!
Voice Cloning and Guardrails of functionalities are well done.

Keep it up Karthik!!