Data Types
Data Types for the SmartSpectra SDK.
InsightType
Origin of an Insight, mirroring the request that produced it. Wire values match the request type field accepted by the Presage 3.0 Analytics Gateway: "vitals", "speech", and "combined".
enum InsightType {
INSIGHT_TYPE_VITALS = 0;
INSIGHT_TYPE_SPEECH = 1;
INSIGHT_TYPE_COMBINED = 2;
}INSIGHT_TYPE_VITALS-- Auto-fired vitals snapshot dispatched periodically by InsightSession with the accumulated metrics buffer and no caller prompt.INSIGHT_TYPE_SPEECH-- On-demand request from RequestInsight with a prompt but no buffered metrics at dispatch time (prompt-only nudge).INSIGHT_TYPE_COMBINED-- On-demand request from RequestInsight carrying both the caller's prompt and a non-empty metrics buffer.
Insight
LLM-generated analysis or error returned by the insights endpoint.
Properties
message Insight {
int32 request_id = 1;
string processed_at = 2;
oneof result {
string analysis = 3;
string error = 4;
}
InsightType type = 5;
}int32request_id-- Client-generated request ID. Populated client-side by the async callback closure (not returned by the server). Lets callers correlate responses to requests.stringprocessed_at-- ISO timestamp of when the analysis was producedstringanalysis-- The LLM analysis text, set on success.stringerror-- Error message, set on failure.InsightTypetype-- Origin of this insight. Mirrors the request type that triggered it so callers can route auto-fired vitals updates separately from on-demand speech/combined replies.
FeatureType
FeatureType defines high-level physiological measurement categories. Each feature represents a super-metric that may encompass multiple individual metrics.
enum FeatureType {
BREATHING = 0;
MICROMOTION = 1;
EDA = 2;
FACE = 3;
CARDIO = 4;
}BREATHING-- Breathing measurements (chest and abdomen)MICROMOTION-- Micromotion detection (glutes, knees)EDA-- Electrodermal activity (EDA) measurementFACE-- Facial tracking and analysisCARDIO-- Cardiovascular metrics (pulse, HRV, blood pressure)
MetricType
MetricType defines individual physiological measurements that can be requested and produced during video-based vital signs analysis.
enum MetricType {
CHEST_BREATHING = 0;
ABDOMEN_BREATHING = 1;
BREATHING_RATE = 2;
BREATHING_AMPLITUDE = 3;
APNEA = 4;
RESPIRATORY_LINE_LENGTH = 5;
BASELINE = 6;
INHALE_EXHALE_RATIO = 7;
GLUTES_MICROMOTION = 8;
KNEES_MICROMOTION = 9;
EDA_TRACE = 10;
FACE_LANDMARKS = 11;
BLINKING = 12;
TALKING = 13;
EXPRESSIONS = 14;
PULSE_RATE = 15;
ARTERIAL_PRESSURE_TRACE = 16;
HRV = 17;
}CHEST_BREATHING-- Breathing upper (chest) metricsABDOMEN_BREATHING-- Breathing lower (abdomen) metricsBREATHING_RATE-- Breathing aggregate metricsGLUTES_MICROMOTION-- Micromotion metricsEDA_TRACE-- EDA metricsFACE_LANDMARKS-- Face metricsPULSE_RATE-- Cardio metrics
RequestedMetrics
Wrapper message for passing a list of requested metrics through MediaPipe packets
Properties
message RequestedMetrics {
repeated MetricType metrics = 1;
}Measurement
Represents a single measurement with timestamp and stability information. Used for various physiological measurements throughout the system.
Properties
message Measurement {
float value = 1;
bool stable = 2;
int64 timestamp = 3;
}floatvalue-- The measured or estimated valueboolstable-- Whether the measurement is considered stable/reliableint64timestamp-- Absolute timestamp at which the measurement was taken, in microseconds, since Linux epoch
DetectionStatus
Represents detection status with timestamp information. Used to track whether a particular physiological feature or state is detected.
Properties
message DetectionStatus {
bool detected = 1;
bool stable = 2;
int64 timestamp = 3;
}booldetected-- Whether the feature/state was detectedboolstable-- Whether the detection is considered stable/reliableint64timestamp-- Absolute timestamp at which the detection status was updated, in microseconds, since Linux epoch
MeasurementWithConfidence
Represents a measurement with an associated confidence score. Extends basic measurement with confidence information for quality assessment.
Properties
message MeasurementWithConfidence {
float value = 1;
bool stable = 2;
float confidence = 3;
int64 timestamp = 4;
}floatvalue-- The measured valueboolstable-- Whether the measurement is considered stable/reliablefloatconfidence-- Confidence score for the measurement (0.0 to 1.0)int64timestamp-- Absolute timestamp at which the measurement was taken, in microseconds, since Linux epoch
ExpressionType
Enumerates the supported facial expression types output by the model.
enum ExpressionType {
UNSPECIFIED = 0;
ANGRY = 1;
CONTEMPT = 2;
DISGUST = 3;
FEAR = 4;
HAPPY = 5;
NEUTRAL = 6;
SAD = 7;
SURPRISE = 8;
}UNSPECIFIED-- Expression is unspecified or unknownANGRY-- Angry expressionCONTEMPT-- Contempt expressionDISGUST-- Disgust expressionFEAR-- Fear expressionHAPPY-- Happy expressionNEUTRAL-- Neutral expressionSAD-- Sad expressionSURPRISE-- Surprise expression
ExpressionScore
Associates an expression type with its confidence score.
Properties
message ExpressionScore {
ExpressionType type = 1;
float confidence = 2;
}ExpressionTypetype-- Expression type identifierfloatconfidence-- Confidence score for the expression (0.0 to 1.0)
Expression
Represents a detected expression with metadata. Used for facial expression analysis and emotion detection.
Properties
message Expression {
bool stable = 1;
int64 timestamp = 2;
repeated ExpressionScore scores = 3;
}boolstable-- Whether the detection is considered stable/reliableint64timestamp-- Absolute timestamp at which the expression was detected, in microseconds, since Linux epochrepeatedExpressionScorescores-- Confidence distribution across all expression types
Hrv
Represents a single HRV measurement computed over some period of pulse data.
Properties
message Hrv {
double rmssd = 1;
double mean_nn = 2;
double sdnn = 3;
double baevsky = 4;
int64 timestamp = 5;
float confidence = 6;
}doublermssd-- root mean square of successive differences between normal heartbeatsdoublemean_nn-- mean normal-to-normal (NN) interval lengthdoublesdnn-- Standard Deviation of normal-to-normal (NN) Intervalsdoublebaevsky-- Baevsky's Stress Index, in 1/ms^2 (inverse-square milliseconds)
Strict
Container for strict/exact values that require high precision. Used when measurements need to be treated with special precision requirements.
Properties
message Strict {
float value = 1;
}floatvalue-- The strict value requiring high precision
Pulse
Comprehensive pulse-related measurements and derived metrics. Contains heart rate, pulse trace, and respiratory coupling information.
Properties
message Pulse {
repeated MeasurementWithConfidence rate = 1;
repeated Measurement trace = 2;
repeated Measurement pulse_respiration_quotient = 3;
Strict strict = 4;
}repeatedMeasurementWithConfidencerate-- Heart rate measurements with confidence scoresrepeatedMeasurementtrace-- Raw pulse trace measurementsrepeatedMeasurementpulse_respiration_quotient-- Pulse-respiration quotient measurements indicating cardio-respiratory couplingStrictstrict-- Strict/high-precision pulse measurements over a fixed time interval. Populated when strict mode analysis is enabled.
Breathing
Comprehensive breathing/respiratory measurements and derived metrics. Contains respiratory rate, traces, and various breathing pattern indicators.
Properties
message Breathing {
repeated MeasurementWithConfidence rate = 1;
repeated Measurement upper_trace = 2;
repeated Measurement lower_trace = 3;
repeated Measurement amplitude = 4;
repeated DetectionStatus apnea = 5;
repeated Measurement respiratory_line_length = 6;
repeated Measurement baseline = 7;
repeated Measurement inhale_exhale_ratio = 8;
Strict strict = 9;
}repeatedMeasurementWithConfidencerate-- Respiratory rate measurements with confidence scoresrepeatedMeasurementupper_trace-- Chest breathing movement trace measurementsrepeatedMeasurementlower_trace-- Abdominal breathing movement trace measurementsrepeatedMeasurementamplitude-- Breathing amplitude measurementsrepeatedDetectionStatusapnea-- Apnea (breathing cessation) detection statusrepeatedMeasurementrespiratory_line_length-- Respiratory line length measurements for breathing pattern analysisrepeatedMeasurementbaseline-- Baseline breathing measurementsrepeatedMeasurementinhale_exhale_ratio-- Inhale to exhale duration ratio measurementsStrictstrict-- Strict/high-precision breathing measurements over a fixed time interval. Populated when strict mode analysis is enabled.
Landmarks
Facial landmark coordinates with temporal and stability information. Used for face tracking and facial feature analysis.
Properties
message Landmarks {
repeated Point2dFloat value = 1;
bool stable = 2;
bool reset = 3;
int64 timestamp = 4;
}repeatedPoint2dFloatvalue-- Array of 2D coordinate points representing facial landmarksboolstable-- Whether the landmark detection is considered stable/reliableboolreset-- Indicates whether the landmark set was reset (cannot be directly associated with previous set)int64timestamp-- Absolute timestamp at which the landmarks were detected, in microseconds, since Linux epoch
Face
Comprehensive facial analysis measurements and detections. Contains blinking, talking detection, landmarks, and expressions.
Properties
message Face {
repeated DetectionStatus blinking = 1;
repeated DetectionStatus talking = 2;
repeated Landmarks landmarks = 3;
repeated Expression expression = 4;
}repeatedDetectionStatusblinking-- Blinking detection status over timerepeatedDetectionStatustalking-- Talking/speech detection status over timerepeatedLandmarkslandmarks-- Facial landmark coordinates over timerepeatedExpressionexpression-- Detected expressions over time
MicroMotion
Micro-motion measurements for body movement analysis. Tracks small movements in specific body regions.
Properties
message MicroMotion {
repeated Measurement glutes = 1;
repeated Measurement knees = 2;
}repeatedMeasurementglutes-- Micro-motion measurements in the glutes regionrepeatedMeasurementknees-- Micro-motion measurements in the knees region
Eda
Electrodermal Activity (EDA) measurements. Tracks skin conductance changes related to autonomic nervous system activity.
Properties
message Eda {
repeated Measurement trace = 1;
}repeatedMeasurementtrace-- EDA trace measurements over time
Cardio
Properties
message Cardio {
repeated MeasurementWithConfidence pulse_rate = 1;
repeated MeasurementWithConfidence arterial_pressure_trace = 2;
repeated Hrv hrv = 3;
}repeatedMeasurementWithConfidencepulse_rate-- Heart rate measurements with confidence scoresrepeatedMeasurementWithConfidencearterial_pressure_trace-- Arterial pressure trace (uncalibrated, unitless) measurements with confidence scoresrepeatedHrvhrv-- Heart rate variability measurements with confidence scores
Metrics
Comprehensive physiological metrics container. Contains all available physiological measurements and analysis results.
Properties
message Metrics {
Breathing breathing = 1;
MicroMotion micromotion = 2;
Eda eda = 3;
Face face = 4;
Cardio cardio = 5;
}Breathingbreathing-- Breathing and respiratory analysis resultsMicroMotionmicromotion-- Micro-motion analysis resultsEdaeda-- Electrodermal activity measurements. Note: processing needs to run for over 35 seconds to generate the first EDA result.Faceface-- Facial analysis resultsCardiocardio-- Cardiovascular measurements (pulse rate, arterial pressure, HRV)
Point2dInt32
Represents a 2D point with integer coordinates. Used for pixel-based coordinate systems and discrete positioning.
Properties
message Point2dInt32 {
int32 x = 1;
int32 y = 2;
}int32x-- X coordinate as 32-bit signed integerint32y-- Y coordinate as 32-bit signed integer
Point2dFloat
Represents a 2D point with floating-point coordinates. Used for precise positioning, normalized coordinates, and sub-pixel accuracy.
Properties
message Point2dFloat {
float x = 1;
float y = 2;
}floatx-- X coordinate as floating-point valuefloaty-- Y coordinate as floating-point value
Point3dFloat
Represents a 3D point with floating-point coordinates. Used for spatial positioning, depth information, and 3D landmark representation.
Properties
message Point3dFloat {
float x = 1;
float y = 2;
float z = 3;
}floatx-- X coordinate as floating-point valuefloaty-- Y coordinate as floating-point valuefloatz-- Z coordinate (depth) as floating-point value
Trace
Internal-only message — not part of the public SDK surface. Used by edge graph calculators to pass time-series samples between processing stages. Public outputs use repeated Measurement directly on the Pulse / Breathing / Eda / Cardio messages, so this type is never serialized to SDK consumers.
Properties
message Trace {
repeated Measurement sample = 1;
}