Inspiration

One time, I was working on a project due at midnight, but I took the risk of finishing it after taking a power nap, a nap I woke up from the next morning, missing my deadline. I needed a hack to prevent myself from falling asleep at the most important times.

What it does

It tracks your facial movement to detect drowsiness or distraction. If it detects it, the website beeps to wake you up, and after a series of beeps, an AI voice motivates you to stay awake based on the prompt you gave it.

How we built it

We built RU Snoozing using React and TypeScript for the frontend with MediaPipe Face Mesh to track facial landmarks in real-time through your webcam. The app monitors your Eye Aspect Ratio to detect when your eyes close and tracks head pitch to see if your head drops down. When it catches you getting drowsy, it plays beep sounds using the Web Audio API. After three beeps, it escalates by calling our Python Flask backend, which uses Google Gemini to generate a personalized wake-up message based on your chosen tone (like scary voice or pep talk), then sends that text to ElevenLabs API for text-to-speech conversion. The Flask server triggers a Node.js script that plays the audio through your speakers. We added session stats tracking, dark/light mode toggle, and bamboo decorations for style. The whole thing runs locally with your webcam feed never leaving your computer.

Challenges we ran into

  • Connecting APIs
  • Git merge conflicts
  • Web cam tracking and detection

Accomplishments that we're proud of

  • Clean UI
  • Complete App
  • Potential to build upon

What we learned

  • Learned a lot about collaboration
  • API usage
  • Combining libraries
  • Full-Stack development

What's next for RU-Snoozing

  • We have a lot of features planned as well as improving the facial recognition model.

Built With

Share this project:

Updates