Warning — Experimental platform: Linux support for the SmartSpectra C++
SDK is experimental. If you have any issues running SmartSpectra,
contact Presage support for assistance.
This guide covers the noble apt suite, which supports both amd64 and
arm64. If you are on Ubuntu 22.04 / Mint 21, follow the
Ubuntu 22.04 / Mint 21 guide instead.
CMake 3.22.1 or later (the version shipped with Ubuntu 24.04 / Mint 22 is sufficient)
C++17 compiler such as GCC or Clang
Vulkan-capable graphics driver — Linux builds use Vulkan inference by default. The SDK package installs the Vulkan loader dependency through apt, but the host must provide a working Vulkan driver.
cmake, curl, gpg, and pkg-config — used by the build, install, and verify steps below. Install with sudo apt install cmake curl gpg pkg-config if they are not already present.
The signed-by= source entry scopes the Presage signing key to the Presage
apt repository. APT selects the package matching your system's
dpkg --print-architecture (amd64 or arm64) automatically.
The SmartSpectra SDK package is self-contained. You do not need to install
protobuf, curl, OpenSSL, or other SDK runtime libraries separately. On
noble, libsmartspectra-dev depends on the distro OpenCV runtime packages
shipped in noble-universe; apt pulls them in automatically when you install
the package.
Verify that the package is visible to build tools:
pkg-config --modversion SmartSpectra
The command prints the installed SDK version (for example, 1.7.0). If it
prints nothing or reports that the package is missing, reinstall
libsmartspectra-dev and confirm you are on a supported Ubuntu 24.04 /
Mint 22 (amd64 or arm64) host.
The example requests breathing and cardio metrics. Add FaceMetrics() or other
metric groups with config.AddMetrics(...) when your app expects those outputs.
A successful build produces the executable at build/hello_vitals. If CMake
reports that it cannot locate SmartSpectra, rerun
pkg-config --modversion SmartSpectra to confirm the SDK is installed
correctly before continuing.
Sit centered in front of the webcam, well-lit, and stay reasonably still. The
app logs breathing and cardio metrics until you stop it with Ctrl+C. If no
face is detected the app still runs and exits cleanly, but no metrics callbacks
fire. An internet connection is required for subscription validation when using
the standard SDK.
The first measurement should start after the executable launches with a valid
API key argument or SMARTSPECTRA_API_KEY environment variable. If startup
fails with an authentication error, verify that the key is authorized for this
app and that your shell did not include extra quotes or whitespace.
A desktop Ubuntu or Mint session provides D-Bus and a Secret Service backend
(gnome-keyring) automatically. Without one — in a Docker container, on a CI
runner, or in an SSH session with no desktop — the SDK cannot persist its
device identity and aborts at initialization with:
Load secret 'key_id' failed: D-Bus Secret Service is not reachable
Install a D-Bus launcher and a Secret Service backend, then start a session
bus and unlock a fresh keyring before running your binary:
dbus-launch --sh-syntax writes export DBUS_SESSION_BUS_ADDRESS=…; to
stdout so the eval exports the address into the current shell's
environment, and gnome-keyring-daemon --unlock --components=secrets opens
the secrets backend with an empty passphrase so libsecret reads and writes
keys unattended. The same three commands also satisfy the SDK on a stock
Ubuntu Server install. (Without --sh-syntax, dbus-launch prints bare
KEY=value lines that eval treats as shell-local assignments rather
than env exports, so the SDK subprocess does not inherit the bus address.)
The SDK package does not install the sample source code. To build the repository
samples against the installed SDK, clone the SmartSpectra repository after
installing libsmartspectra-dev:
Most users only need the stable noble repository above. Use these when you
intentionally need release-candidate packages, version pinning, or repository
removal.
If you are upgrading an older C++ integration, start with the C++ Migration Guide.
If your binary fails at startup with Load secret 'key_id' failed: D-Bus Secret Service is not reachable, you are on a host without a desktop session
— see Running headless for the
D-Bus and keyring bootstrap.
Older Debian instructions installed the Presage key in
/etc/apt/trusted.gpg.d/ and used a source line without signed-by=. If
apt update reports E: Conflicting values set for option Signed-By regarding source https://packages.presagetech.com/apt/ubuntu/ noble, remove the legacy key copy and run apt update again: