This is a submission for the Presage SmartSpectra SDK Challenge.
What I Built
A diamond was stolen from a museum party last night. You were there. Now you're in the interrogation room.
Poker Face: AI Detective is a game where an AI detective, Inspector Noor, asks you 6 questions out loud. You answer by speaking (or typing). While you talk, your webcam quietly watches your heartbeat, breathing and face.
Stay calm and you walk free. Get nervous and the Suspicion Meter goes up. At the end you get your verdict: CLEARED or SUSPICIOUS.
What makes it fun:
- The detective talks to you and remembers what you said. Mention your sister, and the next question is about your sister.
- The meter tells you why it moved, for example: "Your pulse went up after Question 3."
- At the end you see a timeline of every question and how your body reacted.
It's just a game. It is not a real lie detector and not a medical tool.
Demo
Code
Poker Face: AI Detective
An interrogation game. Inspector Noor questions you about a stolen diamond while your webcam reads your pulse, breathing and expression live, using the Presage SmartSpectra SDK. Stay calm for 6 questions and you're cleared.
Entertainment game. Not a real lie detector or medical tool.
Requirements
- Node.js 20+
- uv, which installs Python 3.12 for you
-
Git Bash on Windows, to run
start.sh - A webcam. A microphone is optional, for voice answers.
- API keys
- SmartSpectra, required. Get one at physiology.presagetech.com.
- OpenAI, required. Get one at platform.openai.com.
- Deepgram, optional, for voice. Get one at console.deepgram.com. Without it, you type your answers.
Tested on Windows 10. The SDK also ships builds for macOS (Apple Silicon) and Linux.
Install
git clone https://github.com/MuazAshraf/pokerface-smartspectra.git
cd pokerface-smartspectra
cp .env.example .env # then open .env and paste your keys
npm install
cd backend && uv sync &&…To run it yourself: add your API keys to a .env file and run ./start.sh. All the steps are in the README.
How It Responds to Human Signals
The game uses three live signals from the Presage SmartSpectra SDK: pulse, breathing rate and facial expression.
Here's how a round works:
- First, it learns your "calm". You sit still for 30 seconds while the game learns your normal heartbeat and breathing. Everyone is compared only with themselves, so a person with a naturally fast heartbeat isn't punished.
- Then it asks a question and watches. For the next few seconds it checks whether your pulse went up, your breathing changed, or your face showed stress (fear, surprise and so on).
- The meter moves, and tells you why.
- The detective reacts. The AI writes the next question based on your answer and how your body reacted.
One important rule: the AI does not decide if you're guilty. The code does, using your body signals. The AI can only add a little if your answer dodged the question. Words alone can never get you caught.
How I used the SDK: the app is built with Electron, and the SmartSpectra SDK runs right inside it. I ask the SDK for only the three signals I need, which also makes it start measuring faster. If your face is out of view or the room is too dark, the game tells you how to fix it.
Prize Categories
- Most Creative or Delightful Use. Your own heartbeat becomes the opponent in a detective game.
- Best Thoughtful Real-World Use. It shows how to use body signals responsibly: you agree first, the video stays on your computer, every result is explained, and nothing is saved.
Consent and Data Handling
- You agree first. The camera only turns on after you read a short screen explaining what's used and tick "I agree". That screen, and the screen during the game, say it's an entertainment game, not a lie detector or medical tool.
- Your video never leaves your computer. The SmartSpectra SDK reads your pulse, breathing and expression on your own machine.
- Presage telemetry. The SDK checks the app's API key with Presage and sends one small anonymous report per session (things like SDK version and frame rate). It never sends video, images or your health readings. (Presage's privacy page. The README shows how to turn it off.)
-
AI services, both shown on the consent screen:
- OpenAI gets your answer text and a short note like "pulse +8" so it can write the next question.
- Deepgram turns your voice into text (only while you're answering) and gives the detective a voice. You can type instead if you don't want to use the mic.
- Nothing is saved. No accounts, no database, no recordings. When the game ends, everything is gone.
-
Your keys are safe. API keys stay in a private
.envfile that is never uploaded to GitHub.
Agent Session
I built this with Claude Code, with help from Presage's using-smartspectra skill.
Thanks to Presage for making it possible to read a heartbeat from a normal webcam. It made this game possible.
Top comments (0)