Urgent.News

What's breaking now, across thousands of outlets.

AI

From Zzz's to Data: Building an AI-Powered Sleep Apnea Monitor with Whisper-v3

Sleep is the ultimate black box. We spend a third of our lives doing it, yet we have almost zero data on what happens during those eight hours—unless you're willing to pay for an expensive sleep clinic. Today, we’re going to change that by building a high-fidelity Sleep Apnea and Snore Monitoring system using Whisper-v3 , Librosa , and PyAudio . In this tutorial, we will tackle Whisper-v3 audio…

Sleep is an intricate process that remains largely uncharted territory despite occupying a significant portion of our lives. To address this knowledge gap, a new Sleep Apnea and Snore Monitoring system is being developed harnessing the power of Whisper-v3, Librosa, and PyAudio.

At the heart of this innovative system lies the ability to discern between ambient noise, snoring patterns, and potentially dangerous respiratory pauses. By distinguishing these distinct sound elements, the system aims to provide a comprehensive analysis of sleep patterns and detect any anomalies indicative of sleep apnea.

The architecture of the system is designed to streamline the flow of data from the microphone to the final health report. Audio streaming is initiated using PyAudio, followed by chunked audio processing via Librosa. The RMS energy of the audio is calculated to determine the noise floor, which helps in distinguishing between actual snoring and mere background noise.

When a suspicious sound block is detected, it undergoes analysis using Whisper-v3, a powerful tool known for its high-accuracy audio event tagging capabilities. Whisper-v3 is particularly adept at identifying subtle breath variations, making it an ideal choice for detecting respiratory events during sleep.

The system incorporates a custom prompt tailored specifically towards respiratory sounds, guiding Whisper-v3 to focus on identifying snoring, gasping, and silence. This targeted approach enables the system to accurately pinpoint potential sleep apnea events.

To accurately detect sleep apnea, the system employs a rolling window mechanism, tracking periods of silence followed by a sharp gasp. If the MFCC energy drops below a predefined threshold for 10 seconds, and this is followed by a high-frequency spike indicative of a gasp, the system flags it as a potential sleep apnea event. This stringent detection protocol ensures that false positives are minimized, providing users with reliable and actionable insights into their sleep patterns.

In essence, this cutting-edge Sleep Apnea and Snore Monitoring system represents a significant step forward in harnessing the power of AI and machine learning to unlock the secrets of our nightly slumber. By providing real-time monitoring and analysis of sleep patterns, this innovative solution promises to revolutionize the way we approach sleep health, ultimately leading to better-informed decisions and improved overall well-being.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

AI Creates, AI Delivers, AI Fails — Quality Assurance for Unwatched Systems

📝 Originally published (in Japanese) at forge.workstyle.tech . Building a Fully Automated AI Avatar Streaming System on YouTube and Twitch I built a system that lets AI avatars stream continuously on…

  • Traditional testing assumptions don't apply to unmanned AI streaming system
  • Focus shifted from output correctness to system behavior and guarantees
  • Human intervention needed for certain bugs despite extensive automated testing

Qwen3.8-27B vs Muse Glimmer 30B: Which Permissive Open-Weight Model Fits Your Local GPU?

The August 2026 open-weights pivot For developers and machine learning engineers running inference locally, the open-weight landscape in 2026 has often presented a frustrating compromise.

  • Qwen3.8-27B and Muse Glimmer 30B are permissive open-weight models released in August 2026
  • Qwen3.8-27B has larger context window of 262,144 tokens for longer sequences
  • Both models can run on single 24 GB GPU with 4-bit quantization

Tech firm urges youths to embrace AI

A technology firm, TechRise DTI, has called on youths to embrace Artificial Intelligence and digital skills, saying those who combine human expertise with AI tools will be favoured in the future.

More from Sunday 30 August →