Bringing Clinical-Grade Sleep Scoring Home: How Wesper Calculates Total Sleep Time
Total Sleep Time (TST) is one of the most critical metrics in sleep medicine , shaping the accuracy of diagnoses like obstructive sleep apnea (OSA) and guiding treatment decisions . At Wesper , TST is calculated using an FDA-cleared , AI-powered sleep scoring platform that analyzes physiological signals collected by our wireless biosensors . By combining deep learning algorithms with hospital-grade validation , Wesper delivers reliable, real-time measurement of TST and sleep stages in the home —bringing precision once limited to the sleep lab directly into patients’ bedrooms.
Total Sleep Time (TST) is a key metric in diagnosing and managing sleep disorders such as obstructive sleep apnea (OSA). It reflects the amount of time a person is actually asleep during a sleep study, excluding periods of wakefulness. At Wesper, we use an FDA-cleared, AI-powered sleep scoring platform, to determine TST from the data collected by our wireless biosensors and pulse oximeter.
What is Calculated?
Wesper uses a third-party software-as-a-medical-device (SaMD) cleared by the FDA (K210034). 1 It uses deep learning algorithms to automatically analyze physiological signals from sleep studies, including data collected via Type III and Type IV home sleep apnea tests (HSATs), as well as polysomnography (PSG). It assigns 30-second sleep stages in accordance with American Academy of Sleep Medicine (AASM) guidelines and calculates sleep metrics such as:
Total Sleep Time (TST)
Sleep efficiency
Sleep onset latency
Time in each sleep stage (N1, N2, N3, REM, Wake)
At Wesper, we integrate this algorithmic tool with our HSAT data to score sleep in real time, enabling the calculation of TST directly from the wireless biosensor outputs.
How Total Sleep Time is Calculated
Our third-party sleep scoring platform calculates TST by summing the duration of all epochs scored as sleep (N1, N2, N3, and REM). The process includes:
Preprocessing signals (e.g., respiratory effort, pulse oximetry, heart rate, body position).
Segmenting the data into 30-second epochs.
Classifying each epoch as either wake, N1, N2, N3, or REM using a convolutional neural network trained on thousands of expert-scored sleep studies.
TST = sum of epochs scored as N1, N2, N3, and REM (in minutes or hours).
This method mirrors manual scoring conducted by RPSGTs but is automated and standardized across all Wesper studies.
Accuracy of Total Sleep Time Calculation
Several validation studies have assessed the sleep scoring’s ability to accurately determine TST compared to manual scoring by human experts. 2-3
Key Validation Results:
-
Overall agreement with human scorers:
Third Party TST vs. manual TST: Pearson r = 0.95
Mean Absolute Error (MAE) for TST: ±20.2 minutes
Bias (Bland-Altman): Less than ±5 minutes on average, indicating minimal systematic error.
-
Epoch-by-epoch agreement:
Overall sleep/wake epoch agreement exceeds 85%
Cohen’s Kappa for sleep stage classification: 0.78–0.82, indicating substantial agreement.
FDA 510(k) Summary (K202292):
The sleep scoring SaMD demonstrated non-inferiority to human scoring, with TST showing no statistically significant difference from consensus scorer averages in multicenter testing.
How Wesper Calculates Sleep Stages
In addition to Total Sleep Time (TST), the FDA-cleared third-party sleep scoring platform also calculates individual sleep stages. Sleep staging is determined using a deep learning system trained on over one million diagnostic PGSs paired with photoplethysmography (PPG) data. This approach allows the model to recognize stage-specific physiological patterns and classify 30-second epochs as Wake, N1, N2, N3, or REM.
How Sleep Staging Works
-
Physiological signals (PPG and oximetry) are preprocessed and segmented into 30-second epochs.
- Multiple deep neural network models and statistical signal processing techniques are applied.
-
Epochs are automatically classified into sleep stages (Wake, N1/N2, N3, REM) based on PPG-derived features validated against gold-standard PSG scorers.
- The algorithm outputs both sleep stage labels and derived metrics such as stage duration, sleep efficiency, sleep latency, and wake after sleep onset.
Validation of Sleep Staging
Clinical validation compared algorithmic staging against PSG scored by a consensus panel of registered polysomnographic technologists. Results showed strong agreement across stages:
-
Wake: Sensitivity 86.7%, Specificity 93.5%
-
Light NREM (N1/N2): Sensitivity 80.9%, Specificity 85.5%
-
Deep NREM (N3): Sensitivity 63.4%, Specificity 95.9%
- REM: Sensitivity 83.6%, Specificity 97.5%
Clinical Implications
Accurate estimation of total sleep time is critical for interpreting indices like the Apnea-Hypopnea Index (AHI) and hypoxic burden, which are normalized by sleep time. If TST is overestimated, OSA severity may be underdiagnosed. The high correlation and low error margin help ensure clinically reliable scoring of TST in home settings, enabling providers to make informed decisions based on Wesper reports.
Conclusion
Wesper ensures that TST and sleep stages are calculated with reliability comparable to manual PSG scoring. This approach brings hospital-grade sleep diagnostics into the home, reducing diagnostic delays and improving patient access to care.
Frequently Asked Questions (FAQ)
What is Total Sleep Time (TST)?
Total Sleep Time is the total number of minutes a person is actually asleep during a sleep study, excluding periods of wakefulness. It is one of the most important metrics for evaluating sleep disorders like obstructive sleep apnea (OSA).
How does Wesper calculate TST?
Wesper uses an FDA-cleared, AI-powered sleep scoring platform that processes data from our wireless biosensors and pulse oximeter . The system analyzes 30-second epochs of data and classifies them into sleep stages (N1, N2, N3, REM, or Wake). TST is then calculated by summing all epochs classified as sleep.
Is Wesper’s calculation as accurate as manual scoring?
Yes. Validation studies show that Wesper’s TST calculation has a 95% correlation with human experts , with an error margin of only ±20 minutes. Epoch-by-epoch agreement exceeds 85%, and the system has been found non-inferior to manual scoring in multicenter trials.
Why is accurate TST important?
Metrics like the Apnea-Hypopnea Index (AHI) and hypoxic burden are normalized by TST. If TST is overestimated, a patient’s sleep disorder severity may be underdiagnosed. Accurate TST ensures that clinicians can make informed, reliable treatment decisions.
Does Wesper also measure sleep stages?
Yes. In addition to TST, the platform provides detailed sleep staging (Wake, N1, N2, N3, REM) using deep learning models trained on over one million gold-standard polysomnography (PSG) studies.
How does this benefit patients and providers?
By delivering hospital-grade sleep diagnostics in the home, Wesper reduces barriers to care, shortens time to diagnosis, and empowers providers with accurate, real-time insights that traditionally required an in-lab study.
References
1. EnsoData, Inc. 510(k) Premarket Notification: EnsoSleep (K202292). U.S. Food and Drug Administration. 2020 Nov 20. Available from: https://www.accessdata.fda.gov/cdrh_docs/pdf20/K202292.pdf
2. Patel R, Singh M, Pacheco D, Roy S, Staloch J, Halvorson S, et al. Automated sleep staging and scoring using a deep learning algorithm improves inter-scorer agreement and scoring efficiency. Sleep. 2022 Apr 11;45(4):zsab291. doi:10.1093/sleep/zsab291.
provider portal