Real-time sales conversation intelligence for ADP — powered by ElevenLabs (transcription) and DeepFace (emotion detection).
SenseLense listens to a sales call through your browser's microphone and webcam, then in real-time:
- Transcribes the conversation with speaker diarization (seller vs client) via ElevenLabs
- Detects emotions from the client's face every 2.4 seconds via DeepFace
- Stores everything in a local SQLite database with millisecond timestamps
- Displays a live dashboard with emotion chips, valence bars, and a growing transcript
- Python 3.9+ — check with
python3 --version - Git — to clone the repo
git clone https://github.com/VictorJimenez3/SenseLense.git
cd SenseLense
# Run the setup script — creates venv, installs all deps, inits DB
bash setup.shThat's it. The script will:
- Create a Python virtual environment in
backend/venv/ - Install all dependencies (Flask, ElevenLabs, DeepFace, TensorFlow, OpenCV…)
- Create a
backend/Transcriptions/.envtemplate if one doesn't exist - Initialize the SQLite database
⚠️ First run takes ~3-5 minutes — TensorFlow + DeepFace are large downloads.
Edit backend/Transcriptions/.env:
ELEVENLABS_API_KEY=your_key_here
PRESAGE_API_KEY=your_key_hereGet your ElevenLabs key at elevenlabs.io/app/settings/api-keys
Keys are already set in
.envif you're working from Eren's machine.
Terminal 1 — Backend:
cd backend
source venv/bin/activate
flask run
# → Running on http://127.0.0.1:5050Browser:
open frontend/login.html
# or just double-click the file in FinderSenseLense/
├── backend/
│ ├── app.py # Flask app factory + /api/record endpoint
│ ├── models.py # SQLAlchemy models (Client, Session, Event)
│ ├── config.py # Configuration (DB URI, secret key)
│ ├── requirements.txt # All Python dependencies
│ ├── .flaskenv # Flask environment (port 5050, threading on)
│ ├── blueprints/
│ │ └── api.py # All REST endpoints
│ ├── Transcriptions/
│ │ ├── main.py # Standalone ElevenLabs recording script
│ │ └── .env # API keys (git-ignored)
│ ├── database/
│ │ ├── schema.sql # Raw SQL schema (for reference)
│ │ └── db_manager.py # Low-level SQLite helpers
│ └── presage_capture.py # Standalone webcam emotion capture
├── frontend/
│ ├── login.html # Entry point — open this in browser
│ ├── index.html # Dashboard
│ ├── clients.html # Client list + Add Client
│ ├── client.html # Individual client profile
│ ├── sessions.html # Session history
│ ├── record.html # Live recording session
│ ├── session.html # Session detail / transcript viewer
│ ├── settings.html # App settings
│ ├── css/styles.css # Full design system
│ └── js/
│ ├── api.js # Flask API client (window.api)
│ ├── utils.js # Shared utilities (window.utils)
│ └── auth.js # Local session management
├── setup.sh # ← Run this first
└── README.md
Browser (record.html)
│
├── every 2.4s → canvas JPEG → POST /api/analyze-frame/<session_id>
│ └─ DeepFace (opencv, pre-warmed)
│ └─ emotion + valence → DB → UI chips update
│
└── every 10s → WebM audio → POST /api/transcribe/<session_id>
└─ ElevenLabs scribe_v2 (diarized)
└─ text segments → DB → transcript feed
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/health |
Backend status + DeepFace ready flag |
GET |
/api/clients |
List all clients |
POST |
/api/clients |
Create a client |
GET |
/api/sessions |
List all sessions |
POST |
/api/sessions |
Create a session |
PATCH |
/api/sessions/<id>/end |
End a session |
GET |
/api/sessions/<id>?events=true |
Get session + events |
POST |
/api/transcribe/<session_id> |
Receive audio → ElevenLabs |
POST |
/api/analyze-frame/<session_id> |
Receive JPEG → DeepFace |
POST |
/api/record |
Trigger background transcription |
GET |
/api/sessions/<id>/insights |
Emotion + transcript summary |
Backend offline (red dot in sidebar)
cd backend && source venv/bin/activate && flask runModuleNotFoundError
cd backend && source venv/bin/activate && pip install -r requirements.txtCamera/mic not working
- Allow camera + microphone when the browser asks
- Use Chrome or Edge (Safari has MediaRecorder limitations)
First emotion detection is slow
- Normal — DeepFace loads the TensorFlow model on startup (~10s)
- Subsequent frames are fast (opencv detector, thread pool)