Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Presentation Coach

AI-powered presentation coaching in the browser: speak into your mic (or upload a recording) and get real-time feedback on speaking pace, filler words, and overall clarity.

Python React FastAPI Vite

Features

  • Live coaching — audio streams over a WebSocket and is transcribed in ~4-second windows; pace warnings and filler-word alerts appear while you speak
  • Upload analysis — drop in an audio/video file (MP3, WAV, MP4, WebM, M4A…) for a full report
  • Clarity score (0–10) — combines pace (words per minute) with filler density (fillers per 100 words), so long talks aren't penalized unfairly
  • Accurate metrics — WPM is computed from the exact audio duration, not estimates
  • Silence gating — chunks below an RMS energy threshold are never sent to Whisper, eliminating the classic "Thank you." hallucinations on silent audio

Architecture

┌──────────────┐   raw PCM over WebSocket    ┌───────────────────┐
│ React (Vite) │ ──────────────────────────► │  FastAPI backend   │
│  Web Audio   │ ◄────────────────────────── │                    │
└──────────────┘   live analysis + summary   │  faster-whisper    │
                                             │  (CTranslate2,     │
       upload mode: multipart POST ────────► │   int8, CPU)       │
                                             └───────────────────┘
  • The browser captures mic audio with the Web Audio API, resamples to 16 kHz mono int16 PCM client-side, and streams it as binary WebSocket frames.
  • The backend buffers ~4 s of audio, gates on silence, transcribes with faster-whisper (base.en, int8) — ~5× faster and ~10× lighter than openai-whisper+torch, which is what makes free-tier CPU deployment possible.
  • Sending the text frame "stop" returns a final server-computed summary (exact duration, WPM, filler list, clarity score, coaching feedback) before the socket closes.

Quick start

Backend (Python 3.12+):

cd backend
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --port 8000

Frontend (Node 18+):

cd frontend
npm install
npm run dev        # http://localhost:3000

The frontend targets http://localhost:8000 by default; point it elsewhere with VITE_API_URL.

Tests:

cd backend && python -m pytest tests/

Try upload mode with the included clip: samples/sample.mp3.

Configuration

Variable Default Description
WHISPER_MODEL base.en tiny.en / base.en / small.en — accuracy vs. speed
CORS_ORIGINS * Comma-separated allowed frontend origins
PORT 8000 Backend port
VITE_API_URL http://localhost:8000 Backend URL baked into the frontend build

Deployment

Backend deploys as a Docker container (works on Hugging Face Spaces' free tier); frontend is a static Vite build (Vercel/Netlify). Step-by-step instructions: DEPLOYMENT.md.

Metrics

Pace WPM
Too slow < 100
Optimal 120–160
Too fast > 180

Detected fillers include um, uh, er, like, you know, I mean, sort of, kind of, basically, literally, actually, and more (see backend/analysis.py).

License

MIT

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages