Inspiration

A voice study coach in the style of Alexa+ that remembers your tasks, reschedules what you missed, builds exam revision plans, and quizzes you out loud.

What it does

StudyBuddy is a voice study coach that works like an Alexa+ experience in the browser.

  • Every session starts with a check-in on tasks you missed, and it offers to reschedule them.
  • You can add, finish, or move tasks by voice ("Move the DBMS assignment to Friday").
  • Tell it about an exam and its topics, and it builds a dated revision plan that avoids days you're already busy, with a full-revision session the day before.
  • Say "Quiz me on the OSI model" and it asks one question at a time, corrects you, gives a score, and offers to mark the topic done if you get everything right.
  • A live plan panel highlights whatever the agent just changed, so you can see its actions.

How we built it

The browser handles voice with the Web Speech API (speech recognition and speech synthesis) and draws an animated particle orb on a Canvas that reacts while StudyBuddy listens, thinks, and speaks. A Flask server passes messages to a Python agent that uses Gemini with automatic function calling. The agent's tools (add_task, add_plan, mark_done, reschedule_task, get_missed, load_tasks) read and write a JSON file, which is how StudyBuddy remembers your plan between sessions.

Challenges we ran into

  • The model didn't follow multi-step rules reliably. It once scheduled a topic on the exam day itself. I moved the important rules into code: the missed-task check runs at the start of every session, and add_plan rejects topics on or after the exam and adds the revision day and the exam itself automatically.
  • The free tier for my first model allowed only 20 requests a day, which I used up while testing. I switched to a Lite model with a much higher limit and put the model name in one constant so switching is a one-line change.
  • Gemini sometimes returned 503 and 504 errors, and once a request hung for over three minutes. I added a 30-second timeout and retries with exponential backoff, and tested them by forcing a 1 ms timeout.
  • "Friday" was saved as the wrong date because the prompt had the date but not the weekday. Adding the weekday fixed it.
  • Speech recognition heard "physics" as "fix", so I changed voice input to fill the text box first, so you can correct it before sending.
  • Browsers don't let JavaScript access the audio of built-in speech, so the orb reacts to word-boundary events instead.

Accomplishments that we're proud of

This is my first hackathon. In a few days, I went from a test script to a working voice agent with persistent memory, multi-step planning, a quiz mode, and error handling I tested on purpose.

What we learned

How function calling turns a chatbot into an agent, why critical rules belong in code rather than only in a prompt, how to test failure cases deliberately, and to check my data before assuming my code is wrong.

What's next for StudyBuddy: Running StudyBuddy as a real Alexa+ integration through an MCP server, spaced-repetition reminders based on quiz scores, and support for multiple users.

Built With

Share this project:

Updates

Submission history