DEV Community

Cover image for Roomtone: a link that lets a host feel their room (live Presage readings, never one person)
Bigmanmarsh
Bigmanmarsh

Posted on Edited on

Roomtone: a link that lets a host feel their room (live Presage readings, never one person)

presagechallenge

Presage SmartSpectra SDK Challenge Submission

This is a submission for the Presage SmartSpectra SDK Challenge

What I Built

I run a WhatsApp crypto community. When I share a chart on a call and ask "how does this feel?", people type "fine ๐Ÿ‘". I can't tell who's calm and who's quietly panicking, and nobody wants to be the one who says so.

Roomtone lets the room's bodies answer instead. The host opens a room and shares one link. Everyone who wants to take part opens it on their own phone or laptop, reads exactly what will happen, and ticks a consent box. Nothing to install. When the host starts a moment ("Baseline", "Chart reveal"), each person's camera is read for 45 seconds by the real Presage SmartSpectra SDK running on the Roomtone server. The host then sees the room:

  • median pulse and median breathing,
  • how they changed since the first moment ("+7 bpm vs Baseline"),
  • how many people the numbers came from.

The host never sees one person, and below 3 people they see counts only. Each person sees their own numbers, and only they do.

Try it now (60 s, your own camera, live SDK): https://bigmanmarsh-roomtone.hf.space/judge

Demo

A real, unscripted run on my iPhone against the hosted server: the consent screen, the 10-second line-up, then a live 45-second Presage reading (shown 3ร— faster in the video), then exactly what the host sees.

iPhone: 10-second line-up with the face outline, live measuring at 30 fps, then the room result
On my iPhone: line up (nothing measured yet), measuring live, then what the host sees.

Laptop judge run: my reading on top, and the room view the host gets
On my laptop: my own numbers (only I see these), and the room result the host sees.

Live app: https://bigmanmarsh-roomtone.hf.space ยท Judge path: /judge ยท Live server facts: /proof

The judge path makes you the third person in a room. The other two are recorded real readings of me (clearly labelled), so a single judge sees a real room result after 45 seconds. Your reading is live.

Code

https://huggingface.co/spaces/Bigmanmarsh/roomtone/tree/main

Setup is in the README. It's one npm install, then SMARTSPECTRA_API_KEY=โ€ฆ node server/index.mjs. There's also a smoke test (node scripts/smoke.mjs) that checks the whole room flow without spending a credit.

How It Responds to Human Signals

Signals used: pulse rate and breathing rate, each with Presage's own confidence, plus the SDK's validation codes (face found, chest visible, too dark, too much motion, frame rate too low). I request breathing (chest, abdomen, rate) and cardio (pulse, pulse-pressure trace, HRV).

The integration:

phone/laptop browser                         Roomtone server (free Hugging Face Space, Linux)
getUserMedia -> each real camera frame       Node 22 + @smartspectra/node-sdk 3.5.0
once, with its capture time -> JPEG 480px    sdk.useCustomInput(FrameTransform.kNone)
---- WebSocket ---->                          sharp -> RGB -> sdk.sendFrame(rgb, w, h, stride, kRGB, tsMicros)
<---- pulse, breathing, confidence, hints ----   decodeMetrics() on every 'metrics' event
Enter fullscreen mode Exit fullscreen mode

In real time:

  • While measuring: the participant sees their own pulse and breathing settle, with a confidence %. The SDK's validation codes become plain-English tips: "Sit back a little so your chest is in view", "Too dark. Face a window", "Too much movement. Keep your device steady".
  • When a reading ends: it joins the room only if Presage is confident, meaning pulse confidence โ‰ฅ 40% or breathing โ‰ฅ 30%. If not, the person is told why and it's left out. That way the room's median is never dragged by guesses.
  • On the host's screen: the room view updates live as readings arrive ("2 readings in, 1 measuring now"). The medians appear the moment the third confident reading lands.

Five things building this taught me (all measured, with the log in the repo):

  1. Timing is everything. My first version grabbed frames on a 30 fps timer, which duplicated and skipped camera frames, and pulse confidence sat at 26%. Sending each real camera frame once (requestVideoFrameCallback) with its real capture timestamp raised it to 78โ€“91%.
  2. Real upload speeds matter. 640px frames came to 11.6 MB per 30 s and only reached the server at 20 fps, so the SDK stopped with error 14 ("frame rate too low"). 480px frames: 30 fps, 0 dropped.
  3. Phones are portrait. Squeezing a portrait frame into landscape stretched my face until the SDK said "No face found" for a whole minute. Keeping the camera's real shape fixed it: iPhone, 76.6 bpm at 91%.
  4. On Windows, the SDK's cached device_keys.secure broke every session after the first (NCryptDecrypt โ€ฆ Invalid flags). The server moves it aside before each start.
  5. Three readings at once took the free server down. In a real 3-person test the container was killed mid-moment (memory or CPU, the logs don't say). Now readings in a moment are queued one at a time: everyone else sees "In line" and starts automatically, and the moment stays open until everyone has been read. The SDK also holds on to memory after a reading (peak 4.7 GB), so the server restarts itself fresh whenever it's idle and memory is high.
Real run fps Pulse (confidence)
Laptop, native camera 30 91 bpm (90%)
Laptop browser โ†’ hosted server 29.4 74.1 bpm (89%), confident from 13 s
iPhone browser โ†’ hosted server 30 76.6 bpm (91%)
Laptop browser โ†’ hosted server, judge flow 29 80.7 bpm (92%), breathing 5.9/min (80%)
A second person, their own iPhone, unassisted 29.9 74.2 bpm (81%), breathing 17.5/min (40%)

A real room, 3 people on their own devices (23 Nov, 07:20 Lagos). Readings were queued one at a time. Two were confident (80.8 bpm at 87% on a laptop, 76.8 bpm at 82% on a phone). The third person's page closed after 15 s, so their reading was left out. The host screen showed "2 readings in" and no numbers: the 3-person privacy floor held, which is exactly what it's for.

Prize Categories

Best Thoughtful Real-World Use.

  • The need: hosts of calls, classes, livestream communities and support groups can't read a room they can't see, and people don't say how they feel.
  • Who it's for: the host, and the people in the room.
  • How it's designed for them: one link and no install, because the room is on phones. Consent on each person's own device. A privacy floor of 3. No individual view, ever. Honest confidence floors. An honest limits table in the README.

Most Creative or Delightful Use. Almost every entry I read measures one person, for that person. Roomtone turns many consenting bodies into one shared signal, a "room tone", that no single person gives away.

Consent and Data Handling

  • Camera consent: the camera opens only after the person ticks "I'm the person in front of this camera and I agree to be read during this room's moments" on their own device. Before that they see what will happen, in plain English. Each moment starts with 10 seconds to line up (camera preview and a face outline, nothing measured). During a reading there's a clear "Measuring" sign and a countdown. Hiding the tab stops the reading. Closing the page leaves the room.
  • No covert monitoring: you can't read someone else. Each person runs Roomtone on their own camera, and the SDK flags more than one face.
  • What's sent: camera frames (JPEG, 480px) go from the participant's browser to the Roomtone server over an encrypted WebSocket, and only during a 45 s moment.
  • Storage: frames are decoded in memory, passed to the SDK, and dropped. No frame is ever written to disk. The only thing the server writes to a file is one number, the total seconds measured, so the credit cap survives restarts. /api/status reports framesStoredOnDisk: 0.
  • What's kept: for each reading, two numbers (pulse, breathing) with no name or device ID, in server memory for that room, plus anonymous session stats (fps, seconds, confidence) shown on /proof. A server restart deletes everything. There is no database.
  • Sharing: the host sees only medians and counts, and only from 3 or more people. Each person's own numbers are shown only on their own screen. Nothing is sold or shared with anyone else.
  • Retention and deletion: rooms live in memory only. Idle rooms are cleared after 12 hours, and everything goes on restart.
  • SDK telemetry: turned off (enableTelemetry: false). The SDK does contact Presage to verify usage of my API key (credits).
  • AI services: Roomtone uses no AI service at runtime. I built it with Claude Code as my coding assistant.
  • Not medical: Roomtone reads a room's mood, not anyone's health. No diagnosis and no health advice, and every page says so.

Top comments (12)

Collapse
 
galaxyloner_b8c435154cd84 profile image
Galaxyloner •

this is actually pretty cool, nice build

Collapse
 
bigmanmarsh profile image
Bigmanmarsh •

thanks man, do well to try it out

Collapse
 
shahidivibez profile image
Shahidi •

Iโ€™m really glad to see someone build something that solves a real time community issue.

Collapse
 
bigmanmarsh profile image
Bigmanmarsh •

Thanks for checking it out

Hope you find a good use for it man

Collapse
 
bigdeezeke profile image
BigZeke •

Awesome and useful build for a community

Collapse
 
bigmanmarsh profile image
Bigmanmarsh •

its soo useful, just being able to know the mood of who you're talking to is a boon

Collapse
 
abraham_tofunmi_084195b55 profile image
Sร˜M •

So basically, even my heartbeat can expose that Iโ€™m tired of the meeting before my mouth does. ๐Ÿ˜‚
๐Ÿ’ช๐Ÿ”ฅ

Collapse
 
bigmanmarsh profile image
Bigmanmarsh •

you already get it, and thats all possible due to presage's SDk

Collapse
 
david_olabisi_8cc5b9839a5 profile image
david olabisi •

Awesome build fam

Collapse
 
bigmanmarsh profile image
Bigmanmarsh •

Thanks man

lets check your heartbeat today

Collapse
 
pandora_jason profile image
Pandora Jason •

This is a great stuff love it ****

Collapse
 
bigmanmarsh profile image
Bigmanmarsh •

Im glad you love it
Thats why i built it